Can I recover Lubuntu after accidentally deleting /etc?

November 16, 2026 4 answers
Asked by Vesra.3k

I accidentally ran sudo rm -r /etc on Lubuntu 24.04. I have a Timeshift snapshot, but Timeshift no longer opens from the menu. Can I restore the system, or do I need to reinstall?

Answers

5w~tagmortar_673

Try the Timeshift command line first, if you can still open a terminal and run sudo. Start with sudo timeshift --list, then sudo timeshift --restore if it finds the snapshot. The menu shortcut failing doesn't necessarily mean the snapshot is gone.

If either command fails, save the error message. Deleting /etc can break configuration needed by Timeshift, sudo, and other tools, so the installed system might not be usable enough to perform the restore.

2m!fusecaddy_517:

You can also try running timeshift in a terminal to see what error appears when it fails to open.

Reply to this answer
_c62!drainbookmark.4

If the installed system won't run the restore, boot from your Lubuntu live USB and look for the snapshot from there. You may need to install Timeshift in the live session before using it. Make sure you identify the correct snapshot and target disk before restoring.

A live session runs separately from the damaged installation, so it can be useful when commands on the installed system no longer work.

_p64!drainspindle.8:

You'll need access to whichever disk holds the snapshot. Check that it is visible in the live session before starting a restore.

Reply to this answer
u.249~parcelhook

Another option is to copy the saved /etc directory from the snapshot back to the installed system, preferably from a live environment. That may recover the missing configuration without restoring the whole system.

Be careful with paths and permissions. First verify that the snapshot actually contains an etc directory and that the destination is the installed system's mounted root, not the live session's /etc. Restored settings will reflect the snapshot's age, so later configuration changes could be lost.

Reply to this answer
q.853~buttongavel

Reinstalling is also a reasonable fallback if the snapshot is missing or the restore fails. Before doing that, use the live USB to copy any files you need from the installed system to another drive. Check the installer choices carefully so you don't erase data you meant to keep.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions