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 existinguser-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
- don't reset nonexisting directories to
so yeah, full send. ๐ฅ
--dummy-output PATHโ writes the configuration toPATHinstead 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_HOMEenvironment variable determines where theuser-dirs.dirsfile 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> 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
- arch rolling: xdg-user-dirs 0.20-1 ยท GPL-2.0-or-later
- nixpkgs unstable: xdg-user-dirs 0.20
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms