45

Not me, but a colleague questioned himself for a while over this one. He simply forgot a semicolon when doing some server maintenance:

sudo yum remove application1 sudo yum remove application2

This didn't just remove application1 and 2, it removed sudo and yum too. One slightly embarrassing call to the ops team later, we had to replace the box.

This, ladies and gentlemen, is why you should automate your server maintenance!

Comments
  • 5
    @teganburns I was actually quite impressed that it's even possible to shoot yourself in the foot this way. Yum ftw!
  • 1
    This is why I lose time to do it one by one
  • 3
    Emmm...
    Why didn't he just use "sudo yum remove app1 app2" ???
  • 2
    This makes me feel slightly less dumber, but wiping /dev/sda shouldn't be something so goddamn easy to go about...

    I normally tap out "sudo yum remove application1 application2". There's no need to type the "sudo yum remove" twice. That's how I got a CentOS VPS its dependencies relatively quickly...
  • 1
    Sadly can testify I did something similar. But on a Mac with brew. There was a handy permissions recovery tool hidden is a settings file thankfully. I got sudo back - I remember sitting there sweating thinking I'm so fired.
  • 2
    @teganburns pacman would prevent this, but it also deleted my /lib once (admittedly after ample warning). One `pacman --root=/mnt -Syu` per network-bootet live system and it was up and running again!

    I love that no matter how much you shoot yourself in the foot on Arch it's almost always faster to fix it than reinstall
  • 1
    At least now we know what caused the great AWS outage of 2016.
Add Comment