Created
December 7, 2014 15:02
-
-
Save iddm/739b4f4cb8626098600b to your computer and use it in GitHub Desktop.
Ubuntu/Debian broken packages fix
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
# Originally written by @thomas-w on stackoverflow: http://askubuntu.com/questions/515038/the-package-lists-or-status-file-could-not-be-parsed-or-openederror-during-inst | |
#!/bin/bash | |
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup | |
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status | |
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available | |
sudo rm -rf /var/lib/dpkg/updates/* | |
sudo rm -rf /var/lib/apt/lists | |
sudo mkdir /var/lib/apt/lists | |
sudo mkdir /var/lib/apt/lists/partial | |
sudo apt-get clean | |
sudo apt-get update | |
sudo dpkg --clear-avail | |
sudo dpkg --configure -a | |
sudo apt-get install -f | |
sudo apt-get update | |
sudo apt-get dist-upgrade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment