Skip to content

Instantly share code, notes, and snippets.

@epcim
Created February 6, 2018 16:50
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 epcim/c7afd95f6a23299c4b5c1ffdfc63baa2 to your computer and use it in GitHub Desktop.
Save epcim/c7afd95f6a23299c4b5c1ffdfc63baa2 to your computer and use it in GitHub Desktop.
apt reinstall
#!/bin/bash
for pkg in `dpkg --get-selections | awk '{print $1}' | egrep -v '(dpkg|apt|mysql|mythtv)'` ; do apt-get -y --force-yes install --reinstall $pkg ; done
dpkg --get-selections > selections
sudo dpkg --clear-selections
sudo dpkg --set-selections < selections
sudo apt-get --reinstall dselect-upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment