XDG-USER-DIRS-UPD(1) User Commands XDG-USER-DIRS-UPD(1) NAME xdg-user-dirs-update - Update XDG user dir configuration SYNOPSIS xdg-user-dirs-update [OPTION...] [--set NAME PATH...] DESCRIPTION xdg-user-dirs-update updates the current state of the user's user-dirs.dirs. If none existed before then one is created based on the system default values, or falling back to the old non-translated filenames if such directories exists. The list of old directories used are: ~/Desk- top, ~/Templates and ~/Public. If an old configuration exists it is updated with any new default directo- ries. Additionally, any configured directories that point to non-existing locations are reset by pointing them to the user's home directory. This typically happens when the user removed the directory, so they likely don't want to use it anymore. On the first run a user-dirs.locale file is created containing the locale that was used for the translation. This is used later by GUI tools like xdg-user-dirs-gtk-update to detect if the locale was changed, letting you migrate from the old names. xdg-user-dirs-update is normally run automatically at the start of a user session to update the XDG user dirs according to the user's locale. OPTIONS The following options are understood: .PP --help Print help output and exit. .RE .PP --force Update existing user-dirs.dirs, but force a full reset. This means: Don't reset nonexisting directories to HOME, rather recreate the directory. Never use backwards compatible non-translated names. Always recreate user-dirs.locale. .RE .PP --dummy-output PATH Write the configuration to PATH instead of the default con- figuration file. Also, no directories are created. .RE .PP --set NAME PATH Sets the XDG user dir with the given name. NAME should be one of the following: DESKTOP DOCUMENTS DOWNLOAD MUSIC PICTURES PROJECTS PUBLICSHARE TEMPLATES VIDEOS PATH must be an absolute path, e.g. $HOME/Some/Direc- tory. .RE FILES .PP The XDG user dirs configuration is stored in the user-dirs.dirs file in the location pointed to by the XDG_CONFIG_HOME environment variable. ENVIRONMENT .PP The XDG_CONFIG_HOME environment variable determines where the user-dirs.dirs file is located. EXIT STATUS .PP On success 0 is returned, a non-zero failure code otherwise. EXAMPLES Update user dirs to the current locale: xdg-user-dirs-update Set the Downloads directory explicitly: xdg-user-dirs-update --set DOWNLOAD /home/user/Downloads Force a full reset of all user dirs: xdg-user-dirs-update --force SEE ALSO .PP xdg-user-dir(1), user-dirs.dirs(5), user-dirs.defaults(5), user- dirs.conf(5). AUTHOR Alexander Larsson Developer XDG 08/01/2026 XDG-USER-DIRS-UPD(1)