Skip to content

Instantly share code, notes, and snippets.

@bmaupin
Created February 28, 2019 20:30
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 bmaupin/98d402e53aabb66cc371f6f0d7fab4e4 to your computer and use it in GitHub Desktop.
Save bmaupin/98d402e53aabb66cc371f6f0d7fab4e4 to your computer and use it in GitHub Desktop.
Remove installed .deb files in local directory
# List the packages to be removed
for file in *.deb; do echo $file | cut -d _ -f 1; done | sort -u
# Purge them
sudo dpkg --purge $(for file in *.deb; do echo $file | cut -d _ -f 1; done | sort -u)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment