Mozilla's macOS Firefox browser stores cached files on your Startup Disk and can take up space. This is how to reset Firefox to get back some of that consumed storage.
When you run the Mozilla Foundation's Firefox web browser on your Mac, it creates a profile folder and configuration files in ~/Library/Application Support/Firefox.
If you open that folder in the Finder, you'll see something similar to the following:
The Firefox folder in macOS.
Of particular importance are the Profiles folder and the profiles.ini file.
The Profiles folder contains subfolders, one each storing individual profiles for Firefox. You can edit and manage multiple profiles using Firefox's Profile Manager.
Default locations for Firefox's profile folder
The profiles.ini file contains a list of profiles, their names, their relative paths on disk, and several flags. Each profile is numbered, starting at zero and when Firefox starts it loads profile zero by default.
For example in the profiles.ini file, profiles are named "[Profile0]", "[Profile1]", etc. Usually, there are two initial profiles included but there can be more.
Each profile folder has a randomized name created by Firefox on the first run, and the default profile folder has an extension of ".default-release".
The "Path" variable indicates the actual location of each profile folder on disk, and the "IsRelative" flag indicates if the value of the "Path" variable is relative to the Profiles folder.
The profiles.ini file.
It's entirely possible to set the "IsRelative" flag to 0, then move the profile folder to another location including to another volume, and update the "Path" variable to match.
Keep in mind however, you may not want to move a profile folder to another volume because if you do and the volume is unmounted, Firefox won't be able to read the profile folder - including any bookmarks it contains.
It also won't be able to write out any changes you make to your bookmarks or settings.
Inside profile folders
Firefox timestamps each profile folder in the Profiles folder, and if you have several profile folders you don't use, you can safely delete them - as long as they're not the one indicated in "[Profile0]" in the .ini file.
If you open the profile folder indicated in the "[Profile0]" variable in the .ini file, you'll find dozens of files and folders used by Firefox. Some of these items are critical and should not be removed, some aren't important and can safely be deleted to save disk space.
Keep in mind before changing or removing any of the items in a profile folder you should first save any open pages in Firefox in the Settings window, then quit Firefox.
Altering a profile folder that is in use by Firefox while it is running can result in undefined behavior and/or data loss.
You should probably also make a backup of the profile folder you want to change before making any modifications to it.
Also note that when you clean a Firefox profile folder, you may lose any previously open tabs the next time you launch Firefox, so be sure to have any open tabs you want saved copied to your Firefox Library (bookmarks) window before you quit Firefox.
Once you have your profile folder backed up and have quit Firefox, you can safely remove the following folders from the profile folder:
- bookmarkbackups
- crashes
- minidumps
- saved-telemetry-pings
- weave
The "weave" folder contains mostly Firefox logs which get synced with the Firefox sync service, if you use it.
There are several remaining critical files in the profile folder you should make backups of, but not delete. These include, but are not limited to:
- addons.json
- containers.json
- content-prefs.sqlite
- cookies.sqlite
- extension-preferences.json
- extensions.json
- places.sqlite
- prefs.js
- sessionCheckpoints.json
- storage.sqlite
- xulstore.json
Of these, by far the three most critical files are places.sqlite (bookmarks), prefs.js (Firefox preferences), and xulstore.json (Firefox UI state as you last left it).
Inside the default Firefox profile folder. Note the bookmarks and settings files.
.
Most of the other files can be safely deleted, but you may want to experiment to see what the effects are of deleting each.
If you do want to delete all web cookies stored by Firefox, go ahead and delete the cookies.sqlite file also - but be aware doing so will most likely reset any settings you had stored for previously used websites.
Cookies are small bits of info websites store locally on your computer so the next time you visit the site it can reload previously cached information.
Total reset
If you don't care about your open tabs, the state of Firefox, cookies, the UI, and other settings, then you can do a total Firefox reset for maximum disk space savings.
To do so, be sure you back up places.sqlite and prefs.js first to another location, then delete the entire profile folder and empty the Finder's trash. You'll also need to reset the profile's name and path when a new one is created in the profiles.ini file to make sure Firefox can find the new one.
Once you've done that, the next time you run Firefox it will create a new profile folder by default. If it can't find the profile folder indicated in profiles.ini, and if you don't care about any of the other profiles, you can delete all the profile folders, and let Firefox create a new one on next launch.
After relaunching Firefox and it has recreated a new default profile folder, update the profiles.ini file to match the new profile folder name and path, save the file, and then quit and relaunch it again so it reloads the profiles.ini file.
At this point your new default Firefox profile folder has been created and its size on disk is minimal and clean. The original cluttered profile folder is now gone and you're starting from a clean slate.
All that's left to do now is restore your original places.sqlite and prefs.js files.
To do so, be sure to quit Firefox again first.
This is extremely important because every time you quit Firefox it overwrites places.sqlite and prefs.js with whatever it has stored in memory. If you restore your original places.sqlite and prefs.js files without quitting Firefox first, they may be overwritten with new empty Firefox data.
Next, in the Finder copy your original places.sqlite and prefs.js files into the new profile folder by holding down the Option key on your Mac's keyboard and then dragging them into the new profile folder.
When asked if you want to replace the two files, click Replace for each to overwrite the new default ones in the profile folder with your backed-up copies.
This ensures copies of the two files are copied to the new profile folder. You don't want to simply move the two backed-up files into the new profile folder in case a mistake happens and the files get overwritten by Firefox with default, empty data.
In all instances, you'll want to preserve your backed-up copies of places.sqlite and prefs.js - just in case.
Next, after you've made copies of places.sqlite and prefs.js into the new profile folder, finally re-launch Firefox in the Finder.
If everything goes according to plan Firefox will load the new profile folder by default, including your two restored copies of places.sqlite and prefs.js.
You now have a fully cleaned Firefox folder but still have your original Firefox settings and bookmarks. There is no need to reset any settings in Firefox's settings window - everything will be restored as it was originally.
The only difference you may notice is the size and position of the Library (bookmarks) window may be reset, and the visibility of the toolbars - which you can restore using the View->Toolbars menu item in Firefox.
Total reset - deleting the Firefox folder itself
If you really want to do a complete Firefox reset, and only care about the default profile folder's bookmarks and settings, you can follow the exact same procedure as above. Except, you can delete the entire Firefox folder itself once you have backed up places.sqlite and prefs.js.
Doing so resets the entire Firefox folder and everything in it. Just as in the example above - once you restore your backed-up copies of places.sqlite and prefs.js to the new default profile folder and re-launch Firefox, everything will be restored.
This total reset has the advantage that you won't need to edit the profiles.ini file since you'll be removing that file too when you remove the Firefox folder. The new profile folder and profiles.ini file will automatically be created by Firefox again the next time you launch it.
Quit Firefox again, copy in your backed-up places.sqlite and prefs.js files, re-launch Firefox, and you're done. Everything is reset, but you still have your bookmarks and preferences as before.
Depending on how much you use Firefox and the size of your bookmarks file, Firefox profile folders can grow to be half a gigabyte or one gigabyte in size - not ridiculously huge - but not trivial either.
Delete Firefox's cache folder
As a final step, you will want to delete the Firefox cache folder stored in ~/Library/Caches.
To do so, quit Firefox first, then in the Finder navigate to ~/Library/Caches on your Mac's Startup Disk, and delete the entire "Firefox" folder inside of the Caches folder. Then empty the Finder's trash.
The Firefox cache folder mostly contains a startup cache to make launches quicker, and a few temporary backups. All just in case some important files in the main profile folder don't work as expected.
You can safely delete the entire Firefox cache folder without any harm - Firefox will recreate it the next time you launch it.
Occasionally cleaning your Firefox folder and cache saves a fair amount of disk space, and may even make Firefox run faster in some cases. Once the profile folder is reset, Firefox can traverse that part of the filesystem faster.
Having fewer files, and removing unneeded or bloated files is always a good idea.