Show and Remove Download History of ALL files in 10.7

Mac OS X’s quarantine feature not only sets a special quarantine bit on files you download – so it can alert you the first time you open them, and so its built-it anti-malware feature can scan for certain threats – but it also keeps a list of the files you have downloaded. OS X Daily pointed out the command you can run in Terminal to see the full list of these downloads. Run this command:


sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent'

The resulting text includes a lot of blank lines, so you might want to sort them to better view them:


sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent' | sort

To delete this history – which is a good idea to do from time to time for privacy reasons – run this command:


sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'