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

  1. 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 packagename with the actual app name.

  2. 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.

  3. 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.

  4. 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+H to show hidden folders, or in Terminal with: rm -rf ~/.config/appname ~/.cache/appname ~/.local/share/appname

    Be careful to delete only folders for the app you removed.

  5. 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.

  6. 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.

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.

Download Kudu Free →

Fix this automatically with Kudu

Run a free system scan to detect and resolve this issue automatically — no manual steps required.

Download Kudu Free →