Created
June 23, 2020 20:20
-
-
Save kaderud/f9df6b7329c70f4f90eccbb1b67d6904 to your computer and use it in GitHub Desktop.
Find and purge Ubuntu packages
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
#!/bin/bash | |
# list all Removed packages with conf files (rc), and just print the package name | |
dpkg --list | grep ^rc | awk '{ print $2 }' | |
# remove the packages/conf files | |
apt purge `dpkg --list | grep ^rc | awk '{ print $2 }'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment