Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know it is funny situation but i removed python with all associated programs from Ubuntu using sudo apt-get remove python? Obviously i can install back python, but it will take me a lot of time to install all programs that i removed. Maybe there is some solution?

Thanks

share|improve this question

4 Answers 4

up vote 11 down vote accepted

There is not an easy way but if you look at /var/log/apt/history.log you can see what was removed. Just reinstall each package that was removed.

share|improve this answer
    
It just saved my life! –  Sanket May 24 '13 at 13:21

Look up all the packages that got uninstalled. It is stored at /var/log/apt/history.log . You can write a shell program to install each package that was removed. Write it on any text editor GNU Emacs, vi, GNU Nano. Execute it through the terminal. All the programs that got uninstalled will get re-installed by themselves.

share|improve this answer

To add to ablackhat's answer, you can copy and paste everything after the last remove command in /var/log/apt/history.log into a new programmers editor. Regex replace :.*?, with (empty string), and copy all the resulting space-separated packages. Then run $ sudo apt-get install <paste>

share|improve this answer

if you

 apt-get install python

Python will be reinstalled with all of its prerequisites which is what I'm assuming was all the associated programs your speaking about?

share|improve this answer
    
I have already installed Python, but programs which where dependent on it like Zim, GImp and a lot of others wasn't reverted(( Even Gedit isn't working –  IgorDiy Apr 18 '12 at 20:11
    
-1. Doesn't resolve the OP's question in that everything that needs Python got removed also. –  Magellan Apr 19 '12 at 14:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.