I wanted to remove and reinstall python2.7 interpreter on 12.04
But when I did sudo apt-get remove python2.7
, The crazy terminal started to remove everything!!! Any idea how I can restore whatever I've removed?
I wanted to remove and reinstall python2.7 interpreter on 12.04
But when I did sudo apt-get remove python2.7
, The crazy terminal started to remove everything!!! Any idea how I can restore whatever I've removed?
While reinstalling Ubuntu is probably the easiest way, it's worth pointing out that it's possible to recover without reinstalling everything.
To do this, manually download the python2.7
package (and its dependencies), and manually install them using dpkg
(bypassing APT, which requires Python). Once that's installed, apt
should work again, and so apt-get install ubuntu-desktop
will restore your system. (If apt-get
still doesn't work, you might also need to download and install any missing dependencies.)
In the future, if you need to reinstall a package, instead use
sudo apt-get install --reinstall python2.7
or
sudo aptitude reinstall python2.7
which reinstalls the package without having to remove the dependencies.