How to Remove Leftover Files After Uninstalling Programs on Linux
Clean leftover files and cache after uninstalling apps on Linux safely with Kudu.
By Kudu Team
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →What Causes This?
When you uninstall a program on Linux, the package manager often removes the main app but leaves behind user settings, cache, logs, and dependency packages that were installed separately. This happens by design in many cases, so reinstalling the app later won’t erase your preferences. Over time, these leftover files can build up in your home folder, package cache, and system directories, wasting disk space and sometimes causing conflicts with new installs.
Common Symptoms
- Disk space does not increase much after uninstalling an app
- Old app folders are still present in
~/.config,~/.cache, or~/.local/share - Reinstalling the app brings back old settings automatically
- Package managers still show unused dependencies or cached packages
- You notice leftover logs, temp files, or launcher entries for removed apps
How to Fix It Manually
-
Remove the package completely Open a Terminal and use the correct command for your distro:
- Debian/Ubuntu:
sudo apt remove --purge packagename - Fedora:
sudo dnf remove packagename - Arch:
sudo pacman -Rns packagename
Replace
packagenamewith the actual app name. - Debian/Ubuntu:
-
Delete unused dependencies Some packages stay installed because they were added as dependencies.
- Debian/Ubuntu:
sudo apt autoremove - Fedora:
sudo dnf autoremove - Arch:
sudo pacman -Qdtq | sudo pacman -Rns -
Review the list before confirming removal.
- Debian/Ubuntu:
-
Clear the package manager cache Package downloads can take up a lot of space even after the app is gone.
- Debian/Ubuntu:
sudo apt clean - Fedora:
sudo dnf clean all - Arch:
sudo pacman -Scc
This removes cached installation files you no longer need.
- Debian/Ubuntu:
-
Remove leftover user config and cache files Many apps leave personal data in your home directory. Check these folders:
~/.config~/.cache~/.local/share
For example, if you removed VLC, you might delete:
~/.config/vlc~/.cache/vlc~/.local/share/vlc
You can do this in your file manager by pressing
Ctrl+Hto show hidden folders, or in Terminal with:rm -rf ~/.config/appname ~/.cache/appname ~/.local/share/appnameBe careful to delete only folders for the app you removed.
-
Check for old service files or startup entries Some apps install background services or autostart entries.
- Look in
~/.config/autostart - Check systemd user services with:
systemctl --user list-unit-files | grep appname
Remove any leftover entries tied to the uninstalled app.
- Look in
-
Search for anything still left behind If you want to be thorough, search your system for the app name:
- In Terminal:
find ~/.config ~/.cache ~/.local/share -iname "*appname*" - You can also use your file manager’s search tool.
Delete only files and folders you recognize as belonging to that program.
- In Terminal:
Fix It Automatically with Kudu
If you do not want to hunt through hidden folders, caches, and dependency lists manually, Kudu can scan your system for leftover app files and cleanup opportunities automatically. It helps remove old cache, unused data, and other clutter safely, so you can reclaim space faster without missing hidden leftovers.
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Related guides
How to Remove Leftover Files After Uninstalling Programs on Windows
Clean leftover files, folders, and registry traces after uninstalling apps on Windows using Kudu.
How to Remove Leftover Files After Uninstalling Apps on Mac
Clean leftover app files, caches, and support data on macOS safely with Kudu.
How to Remove Leftover Registry Entries After Uninstalling on Windows
Clean leftover registry entries from old software on Windows safely with Kudu and keep your PC organized.
How to Remove Duplicate Files on Linux
Find and remove duplicate files on Linux to recover storage and reduce clutter using Kudu.