CleanMate

All guides · macOS and Ubuntu · Updated

Delete recent files, browser history and app traces on Mac and Ubuntu

Where a Mac and Ubuntu remember what you opened: Recent Items, Open Recent lists, thumbnails, shell history, download history and browser data. The commands and menus to clear each one, and what CleanMate Privacy does and keeps.

Download for macOS · Install on Ubuntu — free and open source

CleanMate Privacy on a Mac, listing browser data and system history to erase, nothing tickedCleanMate Privacy on a Mac, listing browser data and system history to erase, nothing ticked

Besides the browser, a computer keeps a trail of what you did: the files you opened last, the thumbnails of images you looked at, the commands you typed. None of it is a secret from you, but it is visible to anyone who sits down at your screen, and to the next person who borrows or buys the machine.

This guide lists where each trail is on a Mac and on Ubuntu and how to clear it by hand. It clears records only: your files, bookmarks and passwords stay. For browser history and cookies in depth, see browser cache, history and privacy.

Recent files and Open Recent

Mac. Apple menu › Recent Items › Clear Menu empties the list of recent applications, documents and servers. Each app also has its own list: File › Open Recent › Clear Menu, in Preview, TextEdit, Xcode, Pages and so on. The apps keep their lists in their own preference files, so there is one list to clear per app. Finder’s Recents view is a Spotlight search of recently opened files, not a list you can clear.

Ubuntu. GNOME writes the list to ~/.local/share/recently-used.xbel:

Thumbnails

Both systems keep small previews of images and documents you browsed, even after the original is deleted.

# Mac: Quick Look thumbnails
qlmanage -r cache

# Ubuntu: thumbnails
rm -r ~/.cache/thumbnails/*

They are rebuilt when you open the folder again.

Shell and terminal history

What File
zsh (Mac default) ~/.zsh_history
bash (Ubuntu default) ~/.bash_history
fish ~/.local/share/fish/fish_history
Python, Node ~/.python_history, ~/.node_repl_history
less and Vim ~/.lesshst, ~/.viminfo
history -c && : > ~/.zsh_history     # zsh: clear this session and the file
history -c && : > ~/.bash_history    # bash

Careful: a command line can hold a token or a password you typed. If you see one, change the secret as well as the history. On a Mac, Terminal also restores the text of your last windows: ~/Library/Saved Application State and the Terminal setting “Restore text when reopening windows”.

Download history

A browser lists what you downloaded, and a Mac also keeps its own record of every file downloaded: the name and web address, in a database macOS never prunes. How to clear that one by hand is in the browser guide; Ubuntu has no such database.

Browser history

History, the downloads list and cookies are inside each browser’s profile. Clearing them from the browser’s own menu (Settings › Privacy) is the safest way. Cookies sign you out of websites.

How CleanMate does it

Privacy is its own module, on a Mac (macOS features) and on Ubuntu (Ubuntu features). It is never part of Smart Scan, nothing in it is ticked until you choose it, and what you tick is erased for good, not moved to the Trash. See the Privacy feature page for a full breakdown of supported browsers and system traces.

On a Mac:

On Ubuntu:

CleanMate does not clear your clipboard, the macOS Spotlight index or Finder’s Recents, and it does not remove the websites’ own data in a browser’s storage beyond cookies. Safari history is skipped while Safari has its database open, and with iCloud sync, history from other devices can come back.

FAQ

Does clearing recent files delete the files? No. It clears only the list of names the system remembers. The files stay where they are.

Will clearing shell history break my terminal? No. You lose the up-arrow history and reverse search of those commands (Ctrl+R).

Is clearing history the same as secure erasing? No. The records are deleted, but on an SSD you cannot guarantee the old bytes are overwritten. FileVault on a Mac and disk encryption on Ubuntu are what protect a disk you give away.

Can I stop the system remembering recent files? On Ubuntu yes, with the gsettings command above. A Mac has no single switch for the apps’ own lists; clear them as above when you need to.

Skip the commands

CleanMate runs on both systems: pick yours.

Open source — star it on GitHub: CleanMate for macOS · CleanMate for Ubuntu

How CleanMate decides what is safe to remove →