Skip to content

Instantly share code, notes, and snippets.

@r3vit
Last active September 9, 2021 15:59
Show Gist options
  • Save r3vit/aa3be1ab7f25f9dd38bb3d58cb96026e to your computer and use it in GitHub Desktop.
Save r3vit/aa3be1ab7f25f9dd38bb3d58cb96026e to your computer and use it in GitHub Desktop.
Easy clean Safari History.db
# Steps:
# 1. Close Safari.
# 2. Open the Safari History.db with sqlite3.
cd cd ~/Library/Safari
sqlite3 History.db
# 2. Remove the url that I have visited less than 5 times (there is no timestamp, so I cannot delete the "older than")
# My goal is to remove the ones that I usually don't use and are freezing/lagging Safari.
sqlite> DELETE FROM "history_items" WHERE visit_count <5;
# 3. Open safari. Now it's not freezing/lagging anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment