I was trying to back up my files before doing a fresh install of Fedora due to some issues I faced. Unfortunately, I mistakenly ran "rm -rf /*" while trying to clear my external drive, and it wiped out my entire Fedora installation. Is there any way I can recover at least my important documents from the /home/username/ directory?
5 Answers
You might be able to recover your files using a USB boot with a data recovery tool. Tools like TestDisk or PhotoRec can help retrieve some lost files, but if you're using an NVMe SSD, recovery can be trickier due to how data storage works.
Unfortunately, if you didn't have a backup, the chances of recovery are slim. When you ran that command, it deleted everything on your root directory, so it's pretty serious.
Is there anything at all I can do to get my data back?
Just a heads up for others: always make sure to back up files before experimenting with terminal commands! If you want to delete files safely, try using "rm -ri" to confirm each file before deletion.
Looks like you really messed up this time. To fully recover those files, you'd likely need data forensics, which can be pricey. Just learn from this mistake and always back up your important stuff.
If you're lucky, rm just marks the space as free instead of overwriting the data immediately. Look for user-friendly recovery software that can attempt to read back that data.
Do you have any recommendations for easy-to-use tools?

What's the main difference between recovering from SSD vs HDD?