Created
July 21, 2014 19:36
-
-
Save kumichou/fbbac1fcba896a797116 to your computer and use it in GitHub Desktop.
Sometimes the APT cache gets corrupted and both apt-get and aptitude won't install or update packages. If you want to rebuild that list, this is the script for you!
This file contains hidden or 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
| #!/usr/bin/env bash | |
| mv /var/lib/dpkg/available /root/available-corrupted | |
| touch /var/lib/dpkg/available | |
| sh -c 'for i in /var/lib/apt/lists/*_Packages; do dpkg --merge-avail "$i"; done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment