[Bug] Firefox Creating Cache2.Purge.BG_RM-CachePurge Files When Set to Clear Cache on Close

Today in this article, we are going to discuss about a weird bug present in popular Mozilla Firefox web browser which appeared after release of recent Firefox 109 version. This bug causes Firefox to keep creating random “cache2.2023-xx.purge.bg_rm-cachePurge-xx” files in its ProgramData folder if “Clear history when Firefox closes” option is enabled in Firefox Settings as shown in following screenshot:

Cache2.2023.purge.bg_rm-cachePurge-308046B0AF4A39CB_Files_Firefox_ProgramData_Folder.png

Yesterday, our reader “Jack Smith” shared interesting information about this annoying Firefox bug. Here is the reader’s comment posted at our Help & Support page:

Advertisement

Can you help on this with Firefox?

Firefox 109.0 broke clearing Cache on shutdown.

Since updating I was noticing a ton of junk files being created when closing the browser.

(The folder with the junk files in question resides in your ProgramData folder and named “Mozilla-1de4eec8-1241-4177-a864-e594e8d1fb38”.)

Well after doing some digging it seems to be 100% related to clearing Cache on shutdown.

If you had that enabled then you are probably getting those above “cache2.2023-0X-XX-XX-XX-XX5.purge” files building up.

I searched on Internet to find whether other people are also facing similar issue. I noticed the same comment was posted by a reader “E” at gHacks website. I don’t know whether both Jack Smith and E are same person or not but since the comment posted at gHacks was old, I though of sharing it as a reference.

Advertisement

Many people here know that I also use Firefox as primary browser on my devices. So I immediately checked the mentioned folder in my Windows 11 device but I didn’t find those “cache2.xx” files there.

The “C:\ProgramData\Mozilla-1de4eec8-1241-4177-a864-e594e8d1fb38” folder was containing a single “updates” folder and following 4 files:

  • profile_count_308046B0AF4A39CB.json
  • uninstall_ping_D78BF5DD33499EC2_1b11f0ea-d6a0-4fd5-bc2b-f261480feb11.json
  • UpdateLock-308046B0AF4A39CB
  • UpdateLock-D78BF5DD33499EC2

Then I enabled the clear cache option which the reader shared in his comment. Here is how I enabled the option:

1. Open Firefox Settings (about:preferences) page.

2. Click on “Privacy & Security” section in left-side pane.

3. In right-side pane, scroll down to History section and enable “Clear history when Firefox closes” option.

Clear_History_When_Firefox_Closes_Option_Enabled_Settings_Page.png

PS: The same clear history when Firefox closes option can be enabled using about:config page. Just set privacy.sanitize.sanitizeOnShutdown preference/flag to True.

4. Again click on “Settings” button given next to the clear history option and enable “Cache” option only as shown in following screenshot:

Clear_Cache_When_Firefox_Closes_History_Settings.png

After enabling the option, I closed Firefox and I checked the “C:\ProgramData\Mozilla-1de4eec8-1241-4177-a864-e594e8d1fb38” folder again. I was surprised to see a new file “Cache2.2023-xx.purge.bg_rm-cachePurge-308046B0AF4A39CB” created in the folder. The file size was 0 bytes and Windows was unable to detect its file type. Windows was showing it as an unknown “.bg_rm-cachePurge-308046B0AF4A39CB file” as the extension was automatically taken from the file name.

So it’s definitely a bug in latest Firefox version which creates tons of cache2.xx files in Firefox’s ProgramData folder when clear cache on shutdown option is enabled.

Unfortunately, the bug still exists in the latest Firefox 109.0.1 version.

Now what can be done to fix this bug?

If you don’t use “Clear history when Firefox closes” feature and the option is disabled in your Firefox browser, you don’t need to worry about the issue. Firefox will NOT create any random cache2.xx file in your computer.

But if you have enabled the “Clear history when Firefox closes” option, you can uncheck or deselect “Cache” option to fix the issue temporarily. If you enable other History options, it’ll not cause any bug. It’s the only “Cache” option which is causing this bug in Firefox. If you disable the whole “Clear history when Firefox closes” option, it’ll be the best decision for the moment.

Fortunately, the cache2.xx files can be deleted safely without any issue. So you can delete those files whenever they are created by Firefox. The files are only created when you close or restart Firefox browser.

We should hope Mozilla team will fix the bug soon in upcoming Firefox releases.

Thanks to our reader “Jack Smith” for letting us know about this bug…

Also Check:

[Fix] Firefox Showing Blank Unknown File Icon in Windows Taskbar

Published in: Mozilla Firefox, Troubleshooting Guides

About the author: Vishal Gupta (also known as VG) has been awarded with Microsoft MVP (Most Valuable Professional) award. He holds Masters degree in Computer Applications (MCA). He has written several tech articles for popular newspapers and magazines and has also appeared in tech shows on various TV channels.

Comments

NOTE: Older comments have been removed to reduce database overhead.

  1. Has this Firefox “Creating Cache2.Purge.BG_RM-CachePurge Files When Set to Clear Cache on Close” bug been fixed in new FF Version 110?

  2. UPDATE: The bug has been filed at Bugzilla site. Thanks to Mozilla team.

    bugzilla.mozilla.org/show_bug.cgi?id=1818714
    bugzilla.mozilla.org/show_bug.cgi?id=1818484

  3. VG says:
    The bug has been filed at Bugzilla site. Thanks to Mozilla team.
    bugzilla.mozilla.org/show_bug.cgi?id=1818714

    Unfortunately, they don’t seem to be in any hurry to fix the bug.
    Opened 20 days ago and no progress yet!

  4. According to the above bugzilla reported item, this appears to have a fix and will be included in the upcoming version 114.

  5. This problem was not fixed in version 114 as noted in the Bugzilla reporting. ??

Leave a Comment

Your email address will not be published. Required fields are marked *

NOTE: Your comment may not appear immediately. It'll become visible once we approve it.