Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
43
rated 0 times [  43] [ 0]  / answers: 1 / hits: 142920  / 3 Years ago, mon, august 30, 2021, 8:19:22

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?


More From » restore

 Answers
7

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.


[#35583] Tuesday, August 31, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
steaocyte

Total Points: 345
Total Questions: 122
Total Answers: 121

Location: Spain
Member since Wed, Nov 23, 2022
1 Year ago
steaocyte questions
;