How to Reset User Folders (Documents, Downloads, etc) in Ubuntu 22.04

This simple tutorial shows how to reset user’s default folders, including ‘Desktop’, ‘Documents’, ‘Downloads’, ‘Music’, ‘Pictures’, ‘Public’, ‘Templates’, and ‘Videos’. So, they will work just like at first login.

If you accidentally removed, re-named, or moved your default folders, they may NOT work properly even after re-created them. In the case, this tutorial may help to reset the broken folders to the factory state.

Default Folders are broken even after re-creating them
Though title said for Ubuntu 22.04, this tutorial is also tested and works Ubuntu 23.04, Fedora 38, and Manjaro GNOME.

Step 1: Restore the Folders

If you mistakenly moved the folders to trash or other directories, then find them out and do restore (or move back) to user’s home directory.

This is important if you want to restore documents, and important files. And, if you broke the folders without restart, then this step may make them work again as before!

However, if there’s nothing important, just skip this step!

Step 2: Reset Missing/Broken user folders

If you can’t restore the folders and re-create them won’t make it work as before, then here’s a command line tool to help.

Firstly, launch terminal from start/application menu or ‘Activities’ overview depends on your desktop environment.

When terminal opens, run command:

xdg-user-dirs-update --force

This command will re-generate the default user folders (without touching existing ones), and create ~/.config/user-dirs.dirs file for applications to find and use home directories specific to a user account. And, automatically create ~/.config/user-dirs.locale file to set the language according to the locale in use.

NOTE: This command will do nothing, if you just broke default folders without session restart. So, try log out and back in if it does not work. Also, log out and back in after running the command to apply changes.

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.