Created
July 31, 2023 06:49
-
-
Save JJK96/63160cf49dfd241787ea9ed07e2d730f to your computer and use it in GitHub Desktop.
Fully delete URL from 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
# run in ~/Library/Application Support/Firefox/Profiles/<profile> | |
import sqlite3 | |
url = "%<url>%" | |
con = sqlite3.connect("places.sqlite") | |
cur = con.cursor() | |
cur.execute("delete from moz_places where url LIKE :url;", (url,)) | |
cur.execute("delete from moz_origins where host like :url;", (url,)) | |
con.commit() | |
con.close() | |
con = sqlite3.connect("favicons.sqlite") | |
cur = con.cursor() | |
cur.execute("delete from moz_icons where icon_url like :url;", (url,)) | |
cur.execute("delete from moz_pages_w_icons where page_url like :url;", (url,)) | |
con.commit() | |
con.close() | |
con = sqlite3.connect("weave/bookmarks.sqlite") | |
cur = con.cursor() | |
cur.execute("delete from urls where url like :url;", (url,)) | |
con.commit() | |
con.close() | |
con = sqlite3.connect("webappsstore.sqlite") | |
cur = con.cursor() | |
cur.execute("delete from webappsstore2 where value like :url;", (url,)) | |
con.commit() | |
con.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had an old URL that was still shown in my suggestions, even though I told firefox to forget about the site. After running this script it was finally gone.