Your Mac Remembers Everything You Download. Here’s How to Clear Download History.

Your Mac has a history of everything you’ve ever downloaded, but it’s possible to clear it out. Viewing your Mac download history requires using the Terminal, so it’s unlikely most users would know how to do this. Here’s how to view and clear it.

Viewing Mac Download History

Here is a command that you can simply copy and paste into your Terminal to view your Mac download history:

sqlite3 ~/Library/Preferences/* 'select LSQuarantineDataURLString from LSQuarantineEvent'

This isn’t just Safari downloads. Any app that lets you download files will show up here. This can include torrents, cat photos, porn—anything. This happens because your Mac has used a Quarantine Manager since OS X Snow Leopard. It means that your Mac checks each download for safety issues, so you don’t unknowingly download a virus (although it could still happen.)

Terminal lets you view and clear download history.
Viewing the download history in Terminal.

Clear Mac Download History

Here’s how to delete the history. Again, this is command you can copy and paste into your Terminal:

sqlite3 ~/Library/Preferences/* 'delete from LSQuarantineEvent'

However, your Mac will continue to keep a history, so you’ll need to run these commands every now and then if you want to clear it out.

Image of Automator task to clear download history.
What it looks like in Automator.

Automated Cleaning

As power users, we all like to automate things, so in order to have your Mac automatically clear its history, we can create a Calendar Alarm using Automator. In the sidebar, you can search for “Run AppleScript” and drag it into the work area.

do shell script "sqlite3 ~/Library/Preferences/* 'delete from LSQuarantineEvent'"

Copy and paste the above command into the window. Basically, you’ll just be replacing the default text that says (* Your script goes here *).

Image of an automatic event to clear download history.
Setting up an event in Calendar.

When you save the file, it will automatically create a separate Automator calendar in the Calendar app. This will of course be in the On My Mac section, and not an iCloud calendar. Saving the file will have it run immediately, and only once. But you can edit the event in Calendar to have it run on a specific schedule. I have mine run every Saturday at 11PM.

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Oldest Most Voted
Inline Feedbacks
View all comments

Unfortunately the listed commands don’t quite have the desired effect.
I was suspicious that the file size hadn’t changed, so opened it up in a text editor and the raw data was still present despite a zero result from count(*).

The additional command that is required is ‘vacuum’ to tell sqlite to rebuild the database file:

sqlite3 ~/Library/Preferences/ ‘vacuum LSQuarantineEvent’

Jason Lin

Fantastic find! I wouldn’t have thought to check this. Thanks for sharing the info and solution!


vacuum doesn’t seem to benefit me, but after reading this post/comments again years later I realize there are 3 named databases, of which only 2 apply. From terminal:
ls -l ~/Library/Preferences/*
and querying against all three, only the non-V and V2 have table LSQuarantineEvent
So by following the code provided you never hit the non-V table, which also appears to contain download history.
I updated my script to delete records from both and


Thanks for the info, but It appears that this may not work with High Sierra (public beta). I’ve tried…
sudo sqlite3 ~/Library/Preferences/* ‘select LSQuarantineDataURLString from LSQuarantineEvent’, both with the V* and the V2 and, in both cases, nothing is returned. I haven’t been using any other means to clear my download history, so I’m sure that the data is there, somewhere.

Scott B in DC

You have an error. There is a file* (with the asterisk) that is empty. People need to replace the splat (asterisk) with a 2 so that it looks for the file It is not a good style to rely on wildcards for system-related services. You should ALWAYS use exact file names. If the name has an asterisk I highly recommend that you should quote or escape it to make sure there is no ambiguity. After a little Google-fu, which I suggest when you write something like this, it appears that if there ever was a problem with the… Read more »


I would not recommend deleting the database files as there is more than just the download data table there.


Andrew, thanks for the tip, but perhaps you could try actually following your own instructions ?

Maybe my brain isn’t plugged in this morning ?
But the steps for creating a a Calendars event that runs the clear history script is missing steps / details ?




launch automator, create a calendar event, then on the left pane choose from library / utilities / run AppleScript – drag it to the calendar event pane you created on the right and then you’ll see the code box for his instructions above.


Fascinating. I didn’t find as much there as I would have expected. Does it maybe get cleared out after an upgrade (even a point upgrade)?

There is a timestamp column in the table that contains numbers that look like 452529740.633129. They don’t appear to be large enough to be Unix epoch’s, plus their is a decimal component which epochs usually don’t have. I can’t get strftime to return anything but NULL, no matter what options I try. Anyone know what that is and how to coerce a readable date/time out of it?


Grrrr; “…plus there is a decimal component…”.


Answering my own question: after a bit more searching, it appears that they are # of days, but they start at 2001-01-01 (initial date of OSX) instead of Unix’s epoch. Adding the # of days in-between allows datetime() to return a valid value. (I still don’t know what the decimal is all about, but it returns a date close enough to reality for my current purposes.)


I’m getting the error in the terminal.


There we go, thank you. 🙂 Very cool tip. I knew about the file quarantine, I didn’t know it was so accessible. Really enjoying the more power user-oriented articles.


Excellent, Andrew, but I keep getting a ‘too many options’ error. Any idea why that might be the case?