By mistake execute the rm command in /

January 11, 2020 165 views
Ruby on Rails Ubuntu MySQL Dokku Linux Commands

When I mistakenly execute the command rm in / I delete some things and now I cannot enter the console, I get an error (error file ’/boot/grub/i386-pc/boot.mod’ not found) try to fix it with tutorials but none worked and I wanted to know if they know any way to fix it since I need to log in to take a backup of my database since I can’t access it remotely

2 Answers

Hi @zamorabryan,

It seems like you’ve deleted a really crucial part of the files. Unfortunately, the best and only way would be a backup restore. If you don’t actually have one, I’ll recommend just recreating your droplet.

I know it sounds like a drag however doing an rm on / is pretty much irreversible.


Hey @zamorabryan

@KDSys is right in saying the RM command is a game over moment.

I would restore from your latest backup, if it exists.

If not maybe there is a slim chance you could look at the recovery console to see if any files you wanted where left. However I would not place much hope in that.

SnapShooter - DigitalOcean backups

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!