Last active
July 29, 2019 20:20
-
-
Save doyousketch2/e51431ddbad208db69edc1bda7c1112b to your computer and use it in GitHub Desktop.
Delete Firefox history older than 1 week - in Debian Linux - https://git.io/fjSWS
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 | |
## sudo apt update && sudo apt install sqlite3 | |
## if you're on the Default-channel | |
cd ~/.mozilla/firefox/**.default/ | |
sqlite3 places.sqlite "delete from moz_historyvisits where visit_date < strftime('%s', 'now', '-7 days') * 1000000;" | |
sqlite3 places.sqlite "delete from moz_places where url like '%duckduckgo%'; vacuum;" | |
## if you're on the Beta-channel | |
cd ~/.mozilla/firefox/**.default-beta/ | |
sqlite3 places.sqlite "delete from moz_historyvisits where visit_date < strftime('%s', 'now', '-7 days') * 1000000;" | |
sqlite3 places.sqlite "delete from moz_places where url like '%duckduckgo%'; vacuum;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run this clean-up script while Firefox is closed.
put it in your .bash_profile if you want it to run once at every bootup.