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:
- Settings › Privacy › File History & Trash › Clear Recent History.
- Turn it off for good:
gsettings set org.gnome.desktop.privacy remember-recent-files false. - In a terminal:
rm ~/.local/share/recently-used.xbelwhile no file manager is open.
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:
- Browsers: browsing history, download history, cookies and autofill of Safari, Chrome, Edge, Brave, Arc, Opera, Vivaldi and Firefox, each its own group, skipped while the browser runs. Bookmarks and passwords are kept.
- System: recent items (each app’s Open Recent list on its own row, so you can keep some), Quick Look thumbnails, the download history macOS keeps (only its records; the files stay), Terminal and iTerm2 saved state, and shell, REPL, less and Vim history. The Finder sidebar lists are never touched.
On Ubuntu:
- History: shell history (bash, zsh, fish), Recent files, Python, Node and database shell history, Vim history, and the Alt+F2 and emoji history.
- Browsers: history, the downloads list and cookies of Firefox, Chrome, Chromium, Brave, Edge, Vivaldi and Opera, deb, Snap and Flatpak, every profile. Passwords, bookmarks and extensions are kept; Firefox needs
sqlite3. - In the terminal,
cm --scan --only privacyshows what is stored without deleting anything.
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.

