On Linux, the fonts that matter for everyday graphical applications live in a small set of directories that the fontconfig subsystem knows about — primarily ~/.local/share/fonts (your personal fonts), /usr/share/fonts and /usr/local/share/fonts (system-wide fonts), and a handful of special paths used by sandboxed or specialized software. The rest of the font-like directories you may find on disk serve other subsystems entirely and can generally be ignored when backing up your collection.
Why fonts are scattered across so many directories
Linux has no single font registry. Instead, different layers of the system each maintain their own font locations:
- Fontconfig is the shared discovery mechanism used by nearly all graphical toolkits, including both GTK and Qt applications. It maintains its own list of directories it scans for font files.
- The X server historically had its own font handling, which is why you may still see a
/usr/share/fonts/X11tree alongside the ordinary/usr/share/fontshierarchy. - Specialized software bypasses fontconfig entirely. The Linux console uses
/usr/share/consolefonts, GRUB keeps its own fonts for the boot menu, TeX distributions ship typefaces under atexmftree, and Wine maintains a Windows-style font directory. - Sandboxed applications such as Flatpak re-export fonts through paths like
/var/lib/flatpak/exports/share/fonts, which can make a font visible to sandboxed apps but not to everything else, or vice versa.
This is why the same font may appear in several places, and why a font you install in one directory might not show up in every application you use.
How to get the definitive list of font directories
Rather than guessing, ask fontconfig directly. Running the cache rebuild in verbose mode prints every directory it scans:
fc-cache -fv
Watch the output and you will see each path it walks, from your home directories to the system trees and any Flatpak exports. This is the most reliable inventory of where your graphical applications look for fonts.
To find out where a specific font file lives, ask fontconfig to match it and show the details:
fc-match -v 'Some Font Name'
The verbose output includes the full path of the file that was matched, which is exactly what you need when you want to copy a particular typeface elsewhere.
What the fontconfig directories actually contain
Two similarly named locations confuse many people:
/usr/share/fontconfigdoes not contain fonts. It holds stock configuration snippets that distribution packages install./etc/fonts/conf.dis the directory fontconfig actually reads. It is largely composed of symlinks pointing into the snippets above, enabling or disabling behaviors like hinting, aliasing, and font substitution rules.
Your personal customization belongs in ~/.config/fontconfig/fonts.conf. That is the file to edit if you want per-user substitution rules, preferred defaults, or directory additions — and it is worth including in any backup of your desktop configuration.
The differences between user and system font locations
The practical distinction is less about priority and more about ownership:
~/.local/share/fonts(and the legacy~/.fonts) is for fonts you download and install yourself. No root access needed, no package manager involvement, and they are invisible to other users on the system./usr/share/fontsis managed by your package manager. Fonts there arrived viaapt installor an equivalent, and you should not add, remove, or modify files in it by hand./usr/local/share/fontsis the traditional home for system-wide fonts installed manually by the administrator, outside package management.
Load order between these locations technically exists, but you should not build anything on it. Treat user directories as "mine" and system directories as "the distribution's."
A sensible backup strategy
Trying to enumerate every font directory for backup purposes is fragile. A better approach:
- Back up your home directory as a whole. This captures everything under
~/.local/share/fonts,~/.fonts, and your fontconfig configuration automatically, with no extra effort. - Do not restore files into
/usrfrom a backup. System fonts should be reinstalled through the package manager so the package database stays consistent. - If you only want your personal fonts, compress
~/.local/share/fontsdirectly, or usefc-match -vto locate any specific font files you need and copy those.
For ongoing management rather than backup, a dedicated tool such as Font Manager gives you a graphical view of everything installed, lets you install and remove fonts cleanly, and makes it obvious which fonts you would actually want to preserve.
Getting newly installed fonts recognized
After adding files to a user font directory, most modern desktops pick them up automatically. If an application does not see them, run fc-cache -fv once to rebuild the cache, then restart the application. Keep in mind that fonts installed only in user directories will not be available to Flatpak sandboxed apps unless they are exported appropriately, and will never be used by the console, GRUB, TeX, or Wine, which maintain their own font sources.
Frequently Asked Questions
Is ~/.fonts still valid, or should I use ~/.local/share/fonts?
Both work. ~/.fonts is the legacy location and fontconfig still scans it, but ~/.local/share/fonts follows the modern XDG directory convention. New installs should go there.
Do I need root privileges to install fonts?
Not for your own use. Dropping font files into ~/.local/share/fonts makes them available to all your graphical applications. Root is only needed for system-wide installation, which is best done via the package manager.
Why does a font appear in one app but not another?
The application may be sandboxed (Flatpak), may use a different font backend (TeX, Wine, GRUB), or may simply need its font cache refreshed. Run fc-cache -fv first, then check whether the app uses fontconfig at all.
Should I back up /usr/share/fontconfig?
No. It contains stock configuration snippets shipped by packages and will be recreated on reinstall. Your own tweaks live in ~/.config/fontconfig/fonts.conf, which is the file worth preserving.
How do I find where a specific font file is stored?
Use fc-match -v 'Font Name' and look for the file path in the output. That tells you exactly which directory holds the matching font file.
Can I safely delete fonts from /usr/share/fonts?
Avoid it. Those files belong to packages; deleting them directly leaves the package database inconsistent. Remove package-provided fonts with your package manager instead, and manage personal fonts only in your home directory.