osx-rm-download-history 366 B

123456789101112131415161718
  1. #
  2. # Deletes the macOS download history.
  3. #
  4. # Authors:
  5. # Sorin Ionescu <sorin.ionescu@gmail.com>
  6. #
  7. # function osx-rm-download-history {
  8. local db
  9. for db in ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV*; do
  10. if grep -q 'LSQuarantineEvent' < <(sqlite3 "$db" .tables); then
  11. sqlite3 "$db" 'DELETE FROM LSQuarantineEvent; VACUUM'
  12. fi
  13. done
  14. # }