A bug on the Steam version for Linux has a complication with the rm (remove command) on the BASH (Born Again Shell) that will remove everything from your root directory on.
On Valve’s GitHub Steam for Linux page there are complaints about serious bug that has the potential to wipe out every single personal file on your Linux PC. It will also wipe out documents on USB connected drives, ouch.
The main problem if you are running Steam on Linux is to be careful of their program. It would be wise, not to connect to any local external hard drives while you’re running Steam. Users complaining of this bug appear to have moved their .steam or ~/.local/share/steam directories, or invoked Steam’s Bash script with the —reset option enabled.
UPDATE: Valve gave us the following statement: “So far we have had a handful of users report this issue, after they manually moved their Steam install. We have not been able to reproduce the reported issue, but we are adding some additional checks to ensure this is not possible while we continue to investigate. If anyone else has experienced this or has more information, they should email firstname.lastname@example.org.”
The bug appears to be caused by a line in the Steam.sh Bash script:
rm -rf “$STEAMROOT/“*.
This rm command tells the computer to remove the STEAMROOT directory and all its sub-directories (folders).
The core of the issue is that if the STEAMROOT folder is not there then the computer interprets the command as rm -rf “/“*, which tells the Linux system to delete everything on your hard drive starting from the root directory.
The saving grace for Linux users is that one can only erase files they have write permissions over. That usually means the system itself can’t be erased, but pretty much all of a user’s files—including photos and personal documents—would be at risk.
Ironically, the instruction at issue is preceded by a comment from the developer: # Scary!.