Skip to content

Instantly share code, notes, and snippets.

@towo
Last active December 25, 2015 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save towo/806bb62434ce471bbaf8 to your computer and use it in GitHub Desktop.
Save towo/806bb62434ce471bbaf8 to your computer and use it in GitHub Desktop.
Miscellaneous Debian cleanup actions
# 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