Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have installed CentOS. I want to remove bzip2, so I enter this command in the shell:

yum remove bzip2 bzip2-libs

Then nearly 500 packages were removed and I can't enter any command. For example:

ls 
-bash: /bin/ls no such file or directory

How can I re-install the lost packages?

share|improve this question

migrated from stackoverflow.com Jul 5 '12 at 8:05

This question came from our site for professional and enthusiast programmers.

11  
.... facepalm –  Ignacio Vazquez-Abrams Jul 5 '12 at 5:58
5  
and you were not warned about so many pacages were to be uninstalled? bzip2 is needed by very many other packages, so I don't see a point in uninstalling it... –  glglgl Jul 5 '12 at 5:59
6  
it staggers the mind that you ever thought removing bzip2 was necessary, the program is like 30k? –  SpliFF Jul 5 '12 at 6:03
    
I really want to favorite this one, but I'm afraid I'd be accused of Schadenfreude. Woe the dilemma! –  lornix Jul 6 '12 at 0:38

2 Answers 2

Trying to recover the system will probably take you several hours. I recommend just reinstalling.

share|improve this answer
    
+1, when I ran an indirect dependency check on my system it just kept on scrolling my terminal which means that removing bzip2 is about the most effective way to uninstall a ton of packages. Figuring out all the packages that were removed in the process, as well as getting them all back, is probably non-feasible. Maybe a log still mentions all their names, but then still, I support reinstalling... –  Tom Wijsman Jul 5 '12 at 8:46
3  
forget the fork bomb!!! just uninstall bzip2.... CRASH! Mwahahah!! –  lornix Jul 5 '12 at 8:47
    
@lornix: It's the new rm -rf, I think unmerging things from the system profile should also be preserved unless --no-preserve-root is passed to the package manager. –  Tom Wijsman Jul 5 '12 at 8:58
    
have to introduce the -i-know-what-im-doing-honest-really-i-do-let-me-do-this-shuddup option... just to be sure. –  lornix Jul 5 '12 at 9:00
    
@lornix: when you try to do something like that in the aptitude (text) UI, then a dialog pops up, asking you to enter the exact phrase "Yes, I am aware this is a very bad idea" before continuing ;-) –  Joachim Sauer Jul 5 '12 at 11:42

It is a part of coreutils. Install that

share|improve this answer
1  
hopefully yum itself is still present... –  glglgl Jul 5 '12 at 5:58
    
@glglgl: python needs bzip2-libs. yum needs python. –  Ignacio Vazquez-Abrams Jul 5 '12 at 5:59
    
@IgnacioVazquez-Abrams Badabam. SO a fresh install will probably be pending... –  glglgl Jul 5 '12 at 5:59
1  
no!!!! honestly when I try to install coreutils server said /usr/bin/yum: no such file or direcotory –  babak6 Jul 5 '12 at 6:00
1  
@glglgl: Even better, rpm-libs also needs bzip2-libs. Fun times ahead! –  Ignacio Vazquez-Abrams Jul 5 '12 at 6:01

Your Answer

 
discard

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