In 2011, Bumblebee, a third-party driver that provided support for Nvidia Optimus on Linux, contained a bug in its Bash script that caused the entire /usr directory to be deleted.
install script does rm -rf /usr for ubuntu #123
An extra space at line 351:
rm -rf /usr /lib/nvidia-current/xorg/xorgcauses the install.sh script to do an rm -rf on the /usr directory for people installing in ubuntu.
Totally uncool dude!!! The script deletes everything under /usr. I just had to reinstall linux on my pc to recover.
Removing the space will fix this. Probably should do it quickly!!!
https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/issues/123 (accessed 2025-03-06)
Why it Happened?
The developer intended to delete the directory /usr/lib/nvidia-current/xorg/xorg, but typed a space character between /usr and /lib.... The shell uses space characters to separate arguments, so it parsed the text as two separate arguments instead of a single filepath. For rm, the following terminal command:
rm -rf /usr /lib/nvidia-current/xorg/xorg
Is equivalent to:
rm -rf /usr
rm -rf /lib/nvidia-current/xorg/xorg
Consequently, rm removed /usr, and after that it would try to remove /lib/nvidia-current/xorg/xorg. The latter would likely fail, as this directory's filepath is just a typo and shouldn't exist on the user's machine.
The fix was simple and has one incredible git diff.

rm -rf Bash script from Github. [https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/commit/a047be85247755cdbe0acce6f1dafc8beb84f2ac#diff-043df5bdbf6639d7a77e1d44c5226fd7371e5259a1e4df3a0dd5d64c30dca44fL351] (accessed 2025-03-06)