Removing an app and removing its data are two different actions. On a Mac, dragging an app to the Trash deletes the bundle in /Applications and nothing else. On Ubuntu, apt remove keeps the configuration files, and a snap or Flatpak app keeps its data in your home folder. A browser, a video editor or a chat app can leave from a few MB to several GB behind, for years.
This guide shows where the leftovers are, how to find them for one app, and how to remove them. The rule for both systems: look at what you are about to delete, and check that the app is closed.
Mac: what the Trash leaves behind
Xcode leaves far more than most apps, outside ~/Library too: it has its own guide.
An app in /Applications is a single bundle, but it writes in your user Library, which is hidden from Finder. Open it with Go > Go to Folder and ~/Library. These are the places to look:
~/Library/Application Support/<App>: documents, databases, plug-ins, often the largest.~/Library/Caches/<bundle id>: caches that the app rebuilds.~/Library/Preferences/<bundle id>.plist: settings.~/Library/Containers/<bundle id>and~/Library/Group Containers/<team id>.<group>: the data of sandboxed apps (App Store apps and many others), shared between apps of one developer through the group container.~/Library/Saved Application State/<bundle id>.savedState: the windows to restore.~/Library/Logs/<App>and~/Library/HTTPStorages,~/Library/WebKit: logs and web storage.~/Library/LaunchAgents/*.plist: helpers that start at login. Check these first: a leftover agent keeps trying to launch a program that no longer exists.
Many apps name these folders by bundle id (com.company.app), not by the app’s name. Get the id from the app, before you delete it:
mdls -name kMDItemCFBundleIdentifier -r /Applications/Notion.app
osascript -e 'id of app "Notion"'
Then search with it:
find ~/Library -iname "*notion*" -maxdepth 3 2>/dev/null
mdfind -name notion | grep -v "^/Applications"
du -sh ~/Library/Application\ Support/Notion
Look at the list, then delete each item you recognize. Moving to the Trash is safer than rm, because you can put it back.
System-wide leftovers are in /Library/LaunchDaemons, /Library/PrivilegedHelperTools and /Library/Application Support. Apps installed with a .pkg list their files, which you can read with pkgutil --pkgs | grep -i <name> and pkgutil --files <package id>. Do not delete anything in /System or from Apple.
Homebrew casks
An app installed with brew install --cask should be removed with brew, so that Homebrew’s record is gone and brew upgrade does not bring it back:
brew uninstall --cask notion
brew uninstall --cask --zap notion
--zap also removes the files the cask’s author listed (preferences, caches, Application Support). It only knows what the cask lists, and the list is often incomplete, so searching afterwards still pays off. Zap is not reversible: nothing goes to the Trash.
Ubuntu: apt, snap, Flatpak and AppImage
Each package format leaves something different.
apt (deb packages). apt remove deletes the program but keeps its configuration files in /etc, and apt purge deletes them too. Neither touches your home folder.
sudo apt purge package-name
sudo apt autoremove --purge
dpkg -l | grep '^rc' # packages removed but with config still installed
If dpkg -l | grep '^rc' lists packages, sudo apt purge <name> cleans them.
Snap. snap remove saves a snapshot of the app’s data for 31 days, and it takes disk space. Use --purge to skip it, or list and delete the snapshots:
sudo snap remove --purge firefox
snap saved
sudo snap forget <set-id>
The app’s data in your home is under ~/snap/<name>; it can remain after the snap is gone.
Flatpak. Removing an app keeps its data in ~/.var/app/<app id>. Use:
flatpak uninstall --delete-data org.mozilla.firefox
flatpak uninstall --unused # runtimes no app needs
For an app you already uninstalled without --delete-data, delete ~/.var/app/<app id> yourself.
AppImage. There is nothing to uninstall: delete the .AppImage file. If you integrated it, a launcher stays in ~/.local/share/applications/ (a .desktop file) and an icon in ~/.local/share/icons/. Delete those two as well.
The data every format shares. Apps write in your home folder, in these places, named after the app:
ls -d ~/.config/*name* ~/.local/share/*name* ~/.local/state/*name* ~/.cache/*name* 2>/dev/null
du -sh ~/.config/Code ~/.cache/google-chrome 2>/dev/null
Skip ~/.config, ~/.local and ~/.cache themselves, and folders shared by the desktop (dconf, gtk-3.0, fonts, keyrings). A folder named like a command-line tool you still use is not a leftover.
Reset instead of uninstall
Sometimes the aim is a clean start, not a removal: an app that crashes at launch, or a bad configuration. Quit the app and delete only its own data: on a Mac the folders above for its bundle id, on Ubuntu its folders in ~/.config, ~/.local/share and ~/.cache (for a Flatpak, ~/.var/app/<id>; for a snap, ~/snap/<name>/current). The app stays installed and starts as if it was new. Keep logins in mind: you will have to sign in again, and any local document in that folder is gone unless you keep it.
How CleanMate does it
The Uninstaller is in the sidebar of CleanMate on a Mac (macOS features), and in the desktop and the terminal app on Ubuntu (Ubuntu features). Both show the apps with their real size, the app plus its data, and when you last used it. Sort by size or last use, or show the apps you have not opened for a long time (on a Mac 3, 6 or 12 months). The Uninstaller page walks through it step by step on both systems.
- Uninstall. Tick one app or several and remove them with one confirmation. On a Mac, the app and the data it owns go to the Trash, with one Undo. The data is matched by bundle id and by the team that signed the app, and in Application Support, Caches and Logs by a folder named like the app. Folders that may belong to something else are listed as Possibly related and are never ticked or part of a batch. A Homebrew cask is uninstalled with
brew uninstall --caskafter the app moves to the Trash (without--zap). On Ubuntu it handles apt, Snap, Flatpak and AppImage apps, and refuses a removal that would take something Ubuntu needs with it (GNOME Shell, sudo, the running kernel). An AppImage goes to the Trash as you, with its launcher and an icon only it uses. An app that is running is skipped. - Reset. Reset… keeps the app and moves its data to the Trash, with sizes, so it starts as if new. You choose which folders to include, the app must be closed, and it can be undone (on Ubuntu
rin the terminal app, thenz). - Leftovers of apps already removed. On Ubuntu the last row of the Uninstaller is Leftovers of removed apps: the
~/.var/app/<id>and~/snap/<name>of apps that are gone, and folders in~/.config,~/.local/share,~/.local/stateand~/.cachewhose name matches no package, snap, Flatpak app, launcher or command. Folders the desktop shares, folders with programs in them, folders changed in the last 30 days and folders with an open file are never listed. On a Mac the same list shows folders in~/.config,~/.local/shareand~/.local/statethat no installed app, command-line tool or Homebrew package is named after, marked “No app with this name is installed”. Nothing is ticked for you; they go to the Trash, and Undo puts them back.
CleanMate never removes the hidden configuration of a command-line tool, your shell and login files or keys (.ssh, .gnupg). For the rest of what developers leave on a disk, see Free up disk space on a Mac as a developer and on Ubuntu, Android Studio using too much disk space and Docker using too much disk space. What CleanMate does not do is in the comparison, including how its Uninstaller compares with AppCleaner and Pearcleaner.
On Ubuntu, what apt purge keeps and where the leftovers in ~/.config hide is in uninstall an app and remove its leftover config files.
FAQ
Does dragging an app to the Trash remove everything? No. It removes the app bundle. Its preferences, caches, containers and login helpers stay in ~/Library.
Is apt purge enough on Ubuntu? It removes the package’s configuration in /etc, but not the folders the app created in your home. Check ~/.config, ~/.local/share and ~/.cache.
Why does a snap or Flatpak app leave data behind? Their data belongs to you, not to the package. Use snap remove --purge and flatpak uninstall --delete-data, or delete ~/snap/<name> and ~/.var/app/<id>.
Can a leftover folder be shared with another app? Yes, in group containers on a Mac and in shared config folders on Ubuntu. Check the name and the date before you delete one, and prefer the Trash to rm.

