Close ad

The macOS operating system saves all the data you have downloaded from the Internet in a special file. And now I don't just mean the data that is displayed in the download manager in Safari or in another browser. Downloads that you downloaded without a download manager, such as various images and others, are also recorded. If you want to view this history of all downloaded files, or if you want to delete this history for security reasons, then read this article to the end.

How to completely clear the download history of all files in macOS using Terminal

This entire process of viewing and deleting history will take place in Terminal. You can run this tool either using spotlight, which you activate with a keyboard shortcut Command + Spacebar or by pressing magnifying glass in the right part of the top bar, or start the Terminal from By application from the folder Utilities. After starting the Terminal, a small window will appear, which is used to execute various commands. In case you want to see all the data that you have downloaded on your macOS device, you can copy it command below:

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

Once you do so, this command in the window Insert the terminal. Then all you have to do is press the button Enter, which will execute the command. You can now view the source links of all downloaded files in Terminal.

In case you want this entire download history delete so you just have to copied the command I am attaching below:

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

Then this command again to enter the terminal, and then confirm it with the key Enter. This has removed all download history from your device. If you want to be convinced of this fact, you just need to go to the Terminal again filed a applied first command.

clearing history in terminal

In order to sweep away your traces in the history of the Terminal, all you have to do is enter it filed a Enter confirmed this one command:

history - c

This will delete the history of commands you entered in the Terminal. You can then view the current command history in Terminal using this command:

history
.