Created
February 6, 2018 16:50
-
-
Save epcim/c7afd95f6a23299c4b5c1ffdfc63baa2 to your computer and use it in GitHub Desktop.
apt reinstall
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 | |
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 |
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
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