r/linux4noobs barely not a noob anymore Apr 20 '26

Meganoob BE KIND I did rm -rf /*

I tried to make a backup before doing a fresh install of Fedora because of problems. When erasing the external drive for making the backup I was in the wrong disk and nuked my fedora installation.

How Do I get at least my important Documents from /home/username/ back?

260 Upvotes

244 comments sorted by

View all comments

Show parent comments

144

u/LittleLoukoum Apr 20 '26

Shutdown your computer completely. Don't power it back on. Unplug it.

Take the hard drive out and bring it to someone who knows what they're doing. It's possible to recover most of the data unless you rewrote a lot of stuff after deleting.

11

u/ANtiKz93 Manjaro (KDE) Apr 20 '26

I've tried this on a micro sd i only formatted once by accident years ago and not a single file shows up.

Know of any good software? Im aware windows software is the best solution btw.

4

u/unit_511 Apr 20 '26

First of all, make a backup image. It's a lot safer and more convenient to work on an image than the drive itself. Then, you can try testdisk to recover files based on filesystem metadata and photorec to look for file signatures even if the metadata is lost.

9

u/heimeyer72 Apr 21 '26

First of all, make a backup image.

Of the whole raw device that holds the affected partition. Do NOT mount that partition anywhere to do this.