Skip to content

Instantly share code, notes, and snippets.

@tiemay
Forked from BrunoReX/firefox.xml
Last active August 29, 2015 14:17
Show Gist options
  • Save tiemay/76f1c7f37103ae8134dc to your computer and use it in GitHub Desktop.
Save tiemay/76f1c7f37103ae8134dc to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!--
BleachBit
Copyright (C) 2013-2014 Andrew Ziem
http://bleachbit.sourceforge.net
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- FIXME: figure out which is better (and maybe note why) for globbing the profile dir: "*.default*" or just "*" -->
<!-- FIXME: make sure search methods are correct -->
<!-- Might be cleanable:
$localappdata\Mozilla\updates\*\updates\last-update.log though it might not be exclusive to firefox
$APPDATA\Mozilla\Firefox\Profiles\*.default*\datareporting\state.json
$APPDATA\Mozilla\Firefox\Profiles\*.default*\healthreport\state.json
$localappdata\Mozilla\Firefox\Profiles\*.default*\ShutdownDuration.json
$localappdata\Mozilla\Firefox\Profiles\*.default*\ShutdownDuration.json.tmp
$APPDATA\Mozilla\Firefox\Profiles\*.default*\saved-telemetry-pings\
-->
<cleaner id="firefox_xml">
<label>Firefox (XML)</label>
<description>Web browser</description>
<!-- Linux -->
<running type="exe">firefox</running>
<!-- Windows -->
<running type="exe">firefox.exe</running>
<running type="exe">firefox-bin</running>
<option id="backup">
<label>Backup files</label>
<description>Delete the backup files</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<!-- Firefox version 9.0.1 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/bookmarkbackups/*.json"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox*\Profiles\*.default*\bookmarkbackups\*.json"/>
<!-- Firefox version 36.0.4 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/bookmarkbackups/*.jsonlz4"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox*\Profiles\*.default*\bookmarkbackups\*.jsonlz4"/>
</option>
<option id="cache">
<label>Cache</label>
<description>Delete the web cache, which reduces time to display revisited pages</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<action command="delete" search="walk.files" path="~/.cache/mozilla/firefox*/*.default*/"/>
<action command="delete" search="walk.files" path="~/.mozilla/firefox*/*.default*/Cache/"/>
<action command="delete" search="walk.files" path="~/.mozilla/firefox*/*.default*/OfflineCache/"/>
<!-- I tried to comment this part as best I could, but being such a mess with all the different caches and
different versions of Windows and Firefox, that doesn't seem practical. Instead it might be better to not
comment about which actions belong to which systems and which Firefoxs, and just pile them in as you find more -->
<action command="delete" search="walk.files" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\Cache\"/>
<action command="delete" search="walk.files" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\cache2\"/>
<action command="delete" search="walk.files" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\OfflineCache\"/>
<action command="delete" search="walk.files" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\safebrowsing\"/>
<action command="delete" search="walk.files" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\startupCache\"/>
<action command="delete" search="walk.files" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\thumbnails\"/>
<!-- search methods "file" and "walk.files" wouldn't work here, only "glob" -->
<action command="delete" search="glob" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\directoryLinks.json"/>
<action command="delete" search="glob" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\urlclassifier3.sqlite"/>
<action command="delete" search="glob" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\urlclassifier.pset"/>
<action command="delete" search="glob" path="$USERPROFILE\Local Settings\Application Data\Mozilla\Firefox\Profiles\*.default*\_CACHE_CLEAN_"/>
<!-- The next 2 lines might be duplicates, but I don't feel like messing with it and subsequently testing it right now -->
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\Cache\"/>
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\cache2\"/>
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\jumpListCache\"/>
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\mozilla-media-cache\"/>
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\OfflineCache\"/>
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\safebrowsing\"/>
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\startupCache\"/>
<!-- Also matches thumbnails-old -->
<!-- which would be more efficient here? globbing, or writing out the full paths on a new line? -->
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\thumbnails*\"/>
<!-- Favicon cache (stored when you drag & drop a page into a folder. Windows-only.) -->
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\shortcutCache\"/>
<!-- Necko Predictive Network Actions
https://wiki.mozilla.org/Privacy/Reviews/Necko -->
<action command="delete" search="walk.files" path="~/.mozilla/firefox*/*.default*/netpredictions.sqlite"/>
<action command="delete" search="walk.files" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\netpredictions.sqlite"/>
</option>
<option id="cookies">
<label>Cookies</label>
<description>Delete cookies, which contain information such as web site preferences, authentication, and tracking identification</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<!-- Also matches cookies.sqlite-shm and cookies.sqlite-wal, those files are normally deleted when Firefox closes,
but may be left over if Firefox crashes. For more info: https://support.mozilla.org/en-US/questions/864014 -->
<!-- which would be more efficient here? globbing, or writing out the full paths on new lines? -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/cookies.sqlite*"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/cookies.txt"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\cookies.sqlite*"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\cookies.txt"/>
</option>
<option id="crash_reports">
<label>Crash reports</label>
<description>Delete the files</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<action command="delete" search="walk.files" path="~/.mozilla/firefox*/Crash Reports/"/>
<action command="delete" search="walk.files" path="~/.mozilla/firefox*/*.default*/crashes/"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/minidumps/*.dmp"/>
<action command="delete" search="walk.files" path="$APPDATA\Mozilla\Firefox\Crash Reports\"/>
<action command="delete" search="walk.files" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\crashes\"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\minidumps/*.dmp"/>
</option>
<option id="dom">
<label>DOM Storage</label>
<description>Delete HTML5 cookies</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<!--
Might be cleanable, though I don't know how to make them generate data:
~/.mozilla/firefox*/*.default*/webapps/webapps.json
$APPDATA\Mozilla\Firefox\Profiles\*.default*\webapps\webapps.json
-->
<!-- Also matches webappsstore.sqlite-shm and webappsstore.sqlite-wal, those files are normally deleted when Firefox closes,
but may be left over if Firefox crashes. For more info: https://support.mozilla.org/en-US/questions/864014 -->
<!-- which would be more efficient here? globbing, or writing out the full paths on new lines? -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/webappsstore.sqlite*"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\webappsstore.sqlite*"/>
</option>
<option id="download_history">
<label>Download history</label>
<description>List of files downloaded</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<!-- It seems the downloads list is now stored in places.sqlite, do we have a
method of cleaning that without affecting the other data in there? (e.g. bookmarks) -->
<!-- Firefox version 1 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/downloads.rdf"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\downloads.rdf"/>
<!-- Firefox version 3 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/downloads.sqlite"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\downloads.sqlite"/>
</option>
<option id="forms">
<label>Form history</label>
<description>A history of forms entered in web sites and in the Search bar</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/formhistory.sqlite"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/formhistory.dat"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\formhistory.sqlite"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\formhistory.dat"/>
</option>
<option id="passwords">
<label>Passwords</label>
<description>A database of usernames and passwords as well as a list of sites that should not store passwords</description>
<warning>This option will delete your saved passwords.</warning>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/signons.sqlite"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/signons.txt"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/signons[2-3].txt"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\signons.sqlite"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\signons.txt"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\signons[2-3].txt"/>
<!-- Firefox 36 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/logins.json"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\logins.json"/>
</option>
<option id="session_restore">
<label>Session restore</label>
<description>Loads the initial session after the browser closes or crashes</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<!-- Names include: sessionstore.js, sessionstore.bak,
sessionstore.bak-20140715214327, sessionstore-1.js -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/sessionstore.bak*"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/sessionCheckpoints.json"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/sessionstore*.js"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/sessionstore-backups/previous.js"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/sessionstore-backups/recovery.bak"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/sessionstore-backups/recovery.js"/>
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/sessionstore-backups/upgrade.js-20*"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\sessionstore.bak*"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\sessionCheckpoints.json"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\sessionstore*.js"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\sessionstore-backups\previous.js"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\sessionstore-backups\recovery.bak"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\sessionstore-backups\recovery.js"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\sessionstore-backups\upgrade.js-20*"/>
</option>
<option id="site_preferences">
<label>Site preferences</label>
<description>Settings for individual sites</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/content-prefs.sqlite"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\content-prefs.sqlite"/>
</option>
<option id="url_history">
<label>URL history</label>
<description>List of visited web pages</description>
<!-- testing failed on: Windows: 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- testing failed on: Ubuntu 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<!-- Firefox version 1 -->
<action command="delete" search="glob" path="~/.mozilla/firefox*/*.default*/history.dat"/>
<action command="delete" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\history.dat"/>
<action command="mozilla_url_history" search="glob" path="~/.mozilla/firefox*/*.default*/places.sqlite"/>
<action command="mozilla_url_history" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\places.sqlite"/>
</option>
<option id="vacuum">
<label>Vacuum</label>
<description>Clean database fragmentation to reduce space and improve speed without removing any data</description>
<!-- tested: Windows: xp, vista, 7, 8; Firefox: 9.0.1, 36.0.4; BleachBit: 1.6 -->
<!-- tested: Ubuntu 12.04.5, 14.04.2, 14.10; Firefox: 36.0.1; BleachBit: 1.6 -->
<action command="sqlite.vacuum" search="glob" path="~/.mozilla/firefox*/*.default*/*.sqlite"/>
<action command="sqlite.vacuum" search="glob" path="~/.cache/mozilla/firefox*/*.default*/OfflineCache/*.sqlite"/>
<action command="sqlite.vacuum" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\*.sqlite"/>
<action command="sqlite.vacuum" search="glob" path="$APPDATA\Mozilla\Firefox\Profiles\*.default*\storage\permanent\moz-safe-about+home\idb\*.sqlite"/>
<action command="sqlite.vacuum" search="glob" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\*.sqlite"/>
<action command="sqlite.vacuum" search="glob" path="$localappdata\Mozilla\Firefox\Profiles\*.default*\OfflineCache\*.sqlite"/>
</option>
</cleaner>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment