Long story short, i just accidentally deleted my entire home folder. Thankfully it seems like the hidden files are still there.

I'm not sure, but aren't all of the folders within the home folder (Desktop, Downloads and whatever else is in there) empty by default? If that is the case, could some super nice person just name all of the files located in the home folder so that i can rebuild it?

Thanks a bunch in advance

1 Answer 1


How about making a new user, and then copying all the hidden files to this new user. You could then rename the new user to your old one. I don't know the specifics of your situation, but I think this is better than manually recreating the default folders.

  • That does in fact sound like a more solid option. I'll give it a shot and report back, thank you!
    – qwerty
    Sep 2, 2012 at 20:29
  • I've moved all the files, do i have to change the ownership of the files to the new user or something or will it be good as it is?
    – qwerty
    Sep 2, 2012 at 20:49
  • so now, you should delete your previous user account, restart and log into root account, and run usermod -l new -m -d /home/new old where new and old are obviously your old and new (ie intended) usernames. In this case, you should take your new username to be the one you deleted, and the old one to be the name you gave to this account. There are some path side-effects with this process, but if you say your installation is new, then this should not cause any problems.
    – Zchpyvr
    Sep 2, 2012 at 21:01
  • Thanks, but i'm pretty sure i managed to screw it up completely now. Can't even access it through SSH anymore, i just get a timeout. Wasn't able to remove the old user account either. I'll mark your answer as accepted though, and just reinstall ubuntu tomorrow. I didn't have anything important on it, i'm just experimenting with it. Thanks though!
    – qwerty
    Sep 2, 2012 at 21:20
  • sorry about that. Hope it works out tommorow!
    – Zchpyvr
    Sep 2, 2012 at 21:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .