Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have accidentally deleted /etc. Does anybody knows how to recover from such a situation ? At least I can use ssh while the server is in rescue mode (dedicated server from I could already mount / and /home. Now I need to recover /etc content and reinstall correctly all my stuff. I am using virtual-box for this ad I'll try to copy /etc from the virtual box to the server. May be I will need to make a clean install from scratch ?

share|improve this question
Restore from backups? – andol Apr 3 '13 at 10:13
I don't have backup of /etc – yves Apr 3 '13 at 10:26
"Now I need to recover /etc content" - that's just plain data recovery. There's no undelete, unless you did this in a desktop environment with a file manager with support for a "trash" to recover from. – gertvdijk Apr 3 '13 at 12:19
Unfortunately it is headless, so only via ssh... – yves Apr 3 '13 at 15:25

In leiu of restoring from backup, the easiest way is going to be to just back up /home and reinstall. Next time you can just job the entire VirtualBox file to back it up.

share|improve this answer
yes that's what I currently doing finally. – yves Apr 3 '13 at 13:31
Actually without a backup of /etc, the only way I found is, before a complete re-install, to try to backup as much as possible data. – yves Apr 3 '13 at 15:27
Thanks to all for your comments and suggestions ! Have a nice day. – yves Apr 3 '13 at 15:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.