Created
February 12, 2016 10:47
-
-
Save xorenio/90d0081e9288302710fe to your computer and use it in GitHub Desktop.
This bash script fixes the problem on fresh installs of ubuntu 12.04 installed as a VM on Proxmox, VMware or any container host. On fresh install apt is broken I have mainly seen this problem when installing VMs on OVH
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 | |
rm /var/lib/apt/lists/* -vf | |
apt-get clean | |
apt-get -y autoremove | |
apt-get -y update | |
apt-get -y dist-upgrade | |
apt-get clean | |
cd /var/lib/apt | |
mv lists lists.old | |
mkdir -p lists/partial | |
apt-get clean | |
apt-get update | |
apt-get -y dist-upgrade | |
apt-get -y install linux | |
echo "Fixed APT-GET" | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment