Table of Contents
Finally Firefox supports XDG directories!
After years of cluttering home directories with .mozilla folders, Firefox 147 finally adopted the XDG Base Directory specification. Even though the change is small it is a great one for organization freaks.
Apps that don’t follow the XDG directory specification create disorder in user’s home directories by creating a dotfile directory for each. For example, .mozilla could be a directory next to .cache, next to .nmp, etc.

What’s XDG?
The XDG Base Directory spec comes from freedesktop.org to create a consistent structure for where applications should store their files on Linux systems. Instead of each program creating its own hidden directory directly in your home folder, XDG defines specific locations based on file type.
Config files belong in ~/.config. Application data (things like databases, profiles, state) goes in ~/.local/share. Cache files go to ~/.cache.
This makes it easy for example for backups or to get data from applications, just get everything from ~/.config and ~/.local/share. Want to clear cache? delete ~/.cache without worrying. Pretty simple.
What Changed in Firefox 147
With Firefox 147, new installs use XDG-compliant paths. Your profile goes to ~/.config/mozilla/firefox, cache goes to ~/.cache/mozilla/firefox. Clean, organized, exactly where it should be.
This only affects fresh installs. Existing install are kept in the ~/.mozilla directory. This change doesn’t break anything. Firefox simply checks for the XDG environment variables and uses those paths for new profiles while respecting existing installations.
Should You Migrate?
There is no need to migrate. Nothing was broken to begin with and Firefox continues to work with the old path.
I am wary that maybe some extensions might break with the new path, so if you migrate always backup the config and copy the profile data to the new location.