Skip to content

Instantly share code, notes, and snippets.

@CocoaBeans
Last active December 11, 2015 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CocoaBeans/4568811 to your computer and use it in GitHub Desktop.
Save CocoaBeans/4568811 to your computer and use it in GitHub Desktop.
Bash functions to dump or delete events from the LaunchServices QuarantineEvents database
#!/bin/bash
DumpQuarantineEventsURLs()
{
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent' | awk '/.+/ {print}' | sort
}
DumpQuarantineEvents()
{
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select * from LSQuarantineEvent' | awk '/.+/ {print}' | sort
}
DeleteQuarantineEvents()
{
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment