A disaster just occurred to me after I ran the command "yum remove python" and now I can't boot the server up anymore.
How it happened: I tried updating some apps via yum on my CentOS 5 vps and the command was failing due to some weird python 2.4 error. I noticed that my version of python was old and I tried reinstalling it by first removing it, and so I did yum remove python.
After that it asked me something about removing dependencies and it looked like nothing I could miss so I clicked [Y].
So the aftermath of that was that I was unable to run any command what so ever. I even tried cd /var/www but it said something like "command does not exist in /usr/bin". When I used tab to see folder navigation suggestions, the file structure still seemed to be there (at least the /var/www bit which is really important to me).
After that I tried restarting the vps (from the admin panel since "reboot" command did not work) and now it doesn't boot anymore.
Now my question is: how can a command like that possibly destroy my server like this?
# dpkg --remove dpkgspits outdpkg: error processing dpkg (--remove): this is an essential package; it should not be removed. If I add--force-allto dpkg's command line,dpkgspits out a whole bundle of warnings and proceeds to remove itself, along with breaking about two dozen other packages that depend ondpkg. On a real system, I'm pretty sure you'd have some trouble recovering from that, but you probably could (there's little magic to.debs); CentOS may or may not be similar in this regard. – Michael Kjörling 14 hours ago