Last active
December 25, 2015 12:57
-
-
Save towo/806bb62434ce471bbaf8 to your computer and use it in GitHub Desktop.
Miscellaneous Debian cleanup actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Purges packages that are in state "removed, config-files" | |
if dpkg-query -W --showformat='${Status}\n' dctrl-tools | grep -q 'install ok installed'; then | |
dpkg --purge $(grep-status -n -sPackage -FStatus config-files) | |
else | |
echo "Package 'dctrl-tools' needs to be installed." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment