XDG-USER-DIRS-UPD(1)

โœจ XDG-USER-DIRS-UPD(1) โœจ

okay bestie, buckle up โ€” this is xdg-user-dirs-update from the User Commands manual, and it's genuinely the little gremlin that keeps your Desktop, Downloads, Music and friends all cute and correctly named ๐Ÿ’…

๐Ÿฆ‹ NAME ๐Ÿฆ‹

xdg-user-dirs-update โ€” updates your XDG user dir configuration, no cap ๐Ÿซถ

๐ŸŒธ SYNOPSIS ๐ŸŒธ

xdg-user-dirs-update [OPTION...] [--set NAME PATH...]

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

So basically xdg-user-dirs-update refreshes the current state of your user-dirs.dirs. If you never had one before, it creates one โ€” based on the system default values, or, if that's not happening, it falls back to the old non-translated filenames if such directories exist. The list of old directories it uses is literally: ~/Desktop, ~/Templates and ~/Public. iconic legacy behaviour tbh ๐Ÿ’€

If an old configuration does exist, it gets updated with any new default directories. And any configured directories that point to locations that don't exist get reset by pointing them to the user's home directory. This typically happens when the user removed the directory, so they probably don't want to use it anymore โ€” makes sense, we respect the vibe check โœจ

On the first run, a user-dirs.locale file is created containing the locale that was used for the translation. Later, GUI tools like xdg-user-dirs-gtk-update use that to detect if the locale changed, which lets you migrate from the old names. very demure, very mindful ๐Ÿงš

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. so like, it does its thing while you're still sleepy ๐Ÿ“


๐Ÿ’– OPTIONS ๐Ÿ’–

here's what it understands, bestie:

  • --help โ€” prints help output and dips. that's it. that's the whole thing ๐Ÿ‘‘
  • --force โ€” updates the existing user-dirs.dirs, but forces a full reset. this means, and I'm quoting the energy here:
    • don't reset nonexisting directories to HOME, rather recreate the directory
    • never use backwards compatible non-translated names
    • always recreate user-dirs.locale

so yeah, full send. ๐Ÿ”ฅ

  • --dummy-output PATH โ€” writes the configuration to PATH instead of the default configuration file. also, no directories are created. it's giving "just taking notes, not touching anything" ๐Ÿ™ˆ
  • --set NAME PATH โ€” sets the XDG user dir with the given name.

NAME should be one of the following:

DESKTOP
DOWNLOAD
TEMPLATES
PUBLICSHARE
DOCUMENTS
MUSIC
PICTURES
VIDEOS

PATH must be an absolute path, e.g. $HOME/Some/Directory. absolute only โ€” no relative nonsense, we don't do that here โญ


๐Ÿฆ‹ FILES ๐Ÿฆ‹

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 ๐ŸŒˆ

  • The XDG_CONFIG_HOME environment variable determines where the user-dirs.dirs file is located. that's the one and only, she's the main character ๐Ÿ‘‘

๐ŸŒŸ SEE ALSO ๐ŸŒŸ

xdg-user-dir(1), user-dirs.dirs(5), user-dirs.defaults(5), user-dirs.conf(5).

๐Ÿซถ AUTHOR ๐Ÿซถ

Alexander Larsson <alexl@redhat.com> &nbsp;&nbsp;&nbsp;&nbsp;Developer


fr fr go read the SEE ALSO pages too, they're lowkey part of the lore ๐Ÿ“š

and that's the whole page, bestie โ€” this one's the XDG version, dated 04/08/2026, and you were reading XDG-USER-DIRS-UPD(1). slay, you now understand user dirs ๐Ÿ’…โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from