#!/bin/sh -e can_remove() { dpkgconf='/etc/dpkg/dpkg.cfg.d/usrmerge' [ -e "$dpkgconf" ] || return 0 local pkgs="$(awk '/^# [^ ]+$/ { print $2 }' $dpkgconf)" [ "$pkgs" ] || return 0 local installed="$(dpkg-query --showformat='${Package}\n' --show $pkgs 2> /dev/null)" if [ "$installed" ]; then cat <