Created
May 8, 2012 15:55
-
-
Save chesterbr/2636602 to your computer and use it in GitHub Desktop.
Script that cleans up Firefox data files on Mac OS X, useful for "old" installs that get slower with time. I used Automator.app to make it run when I login, so whenever I reboot the computer I get a fresh, snappier Firefox!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Closes any running Firefox (you'd better close it manually, | |
# but this is a safeguard) | |
killall firefox | |
# Defragments all databases. A few will result in "Error: file | |
# is encrypted or is not a database". It's fine, they will be | |
# skipped and no harm will be done. | |
for f in ~/Library/Application\ Support/Firefox/Profiles/*/*.sqlite; do sqlite3 "$f" 'VACUUM;'; done | |
# Reopens Firefox - comment with '#' if you don't want it to happen | |
open /Applications/Firefox.app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment