Ubuntu ships software through several channels—APT .deb packages, Snap, Flatpak, local .deb files, and sometimes tarballs or scripts you dropped in /usr/local. Each channel has its own uninstall command, and using the wrong one leaves binaries, menu entries, or config files behind.
This guide covers every practical way to remove software on Ubuntu: find the real package name, apt remove vs purge, Snap and Flatpak uninstalls, the graphical Ubuntu Software / App Center path, cleaning rc leftovers, and what to do when you installed outside APT. I ran the terminal examples on Ubuntu 25.04 with small packages (sl, cowsay, figlet, hello-world snap) so you can compare your output. Where APT behavior surprised me—autoremove pulling in unrelated tools, figlet staying as rc after remove—the fix is in the same section.
Tested on: Ubuntu 25.04 (Plucky Puffin); kernel 6.14.0-37-generic.
sudo apt remove firefox does nothing if Firefox came from Snap; snap remove does nothing for a plain apt package. When in doubt, check with dpkg -l packagename, snap list, and flatpak list --app.
Quick command summary
| Task | Command |
|---|---|
| Remove APT package (keep config) | sudo apt remove packagename |
| Remove APT package + config | sudo apt purge packagename |
| Drop unused dependency packages | sudo apt autoremove |
| Find package owning a command | dpkg -S "$(command -v binary)" |
| List installed APT packages | apt list --installed (pipe to grep -i keyword) |
Purge rc leftover |
sudo apt purge packagename or sudo dpkg --purge packagename |
| Uninstall Snap | sudo snap remove snapname |
| Uninstall Flatpak | flatpak uninstall APP_ID |
| Confirm APT package gone | apt-cache policy packagename |
| Confirm command gone | command -v binary (no output if removed) |
List rc config leftovers |
dpkg -l (lines starting with rc) |
Choose the removal method first
| How it was installed | What to run |
|---|---|
sudo apt install … or Ubuntu Software (deb) |
sudo apt purge packagename |
sudo apt install ./something.deb |
sudo apt purge packagename (name inside the .deb, not the filename) |
sudo snap install … |
sudo snap remove snapname |
flatpak install … |
flatpak uninstall APP_ID |
Copied binary or make install to /usr/local |
Delete files manually or run make uninstall if upstream provides it |
Language-specific (pip, npm, cargo install) |
Use that tool's uninstall (pip uninstall, npm uninstall -g, delete ~/.cargo/bin/…) |
For stack-specific teardown (Docker, Python interpreters, Yazi, qBittorrent), see the dedicated guides linked in Related uninstall guides at the end.
Find the package name
Menu labels rarely match APT names. Before you remove anything, resolve the real identifier.
If the command still exists
dpkg -S "$(command -v figlet)"On my host, while figlet was installed:
figlet: /usr/bin/figletThe package name is the part before the colon: figlet. See also dpkg command examples.
Search installed packages
apt list --installed 2>/dev/null | grep -i cowsaycowsay/plucky,now 3.03+dfsg2-8 all [installed]The name before / is what you pass to apt remove or apt purge.
Search the archive (not yet installed)
apt search '^sl$'Use apt show sl for a description and dependencies before you remove a metapackage like ubuntu-desktop—purging the wrong name can pull a large tree.
sudo apt purge and press Tab twice to list installed package names, or dpkg -l | grep -i keyword for a shorter list.
Remove APT packages (apt remove and apt purge)
Most Ubuntu software—CLI tools, libraries, server daemons, and many GUI apps—comes from APT. Use sudo for system-wide packages.
apt remove — drop the program, may keep config
sudo apt remove slThe summary line shows what will be removed:
REMOVING:
sl
Summary:
Upgrading: 0, Installing: 0, Removing: 1, Not Upgrading: 38
Freed space: 60.4 kBAfterward, command -v sl printed nothing and dpkg -l sl reported no package—sl has almost no config files, so it disappeared completely.
apt purge — remove program and system config
sudo apt purge figletUse purge when you want /etc snippets and dpkg config state gone. For figlet, a plain remove left a residual rc row (removed but config files remain):
rc figlet 2.2.5-3 amd64 Make large character ASCII banners out of ordinary textrc means "removed, config files still on disk." Finish cleanup with:
sudo apt purge figletor sudo dpkg --purge figlet. After purge, dpkg-query: no packages found matching figlet is what you want.
apt remove and apt purge do not delete your data under /home. Mail in ~/Mail, browser profiles, and game saves stay unless the app stored them there and you delete the folders yourself.
apt autoremove — clean dependency orphans (read the list)
When you remove a package, APT may suggest dependencies that are "no longer required":
The following packages were automatically installed and are no longer required:
fortunes-min librecode3
Use 'sudo apt autoremove' to remove them.Run:
sudo apt autoremoveThis one caught me: after removing cowsay, a later autoremove on the same host also removed fzf, ripgrep, zoxide, and xsel because APT had marked them auto-installed and nothing else depended on them anymore—even though I still wanted those CLI tools for other workflows. Always read the REMOVING list before you confirm. For deeper cleanup of caches and orphans, see remove unused packages on Ubuntu.
Wrong package name
sudo apt remove this-package-does-not-existError: Unable to locate package this-package-does-not-existDouble-check spelling and whether the app is a Snap or Flatpak instead.
Remove Snap packages
Snaps are common for desktop apps (Firefox, Chromium, IDE bundles). List them:
snap listInstall and remove a tiny test snap:
sudo snap install hello-world
hello-world
sudo snap remove hello-worldhello-world 6.4 from Canonical** installed
Hello World!
hello-world removed (snap data snapshot saved)A second snap list hello-world reports no matching snaps installed. Wrong names fail clearly:
snap "nonexistent-snap-xyz" is not installedUse the Name column from snap list, not the store title. Some snaps need sudo; others work as your user—if remove fails, retry with sudo snap remove name.
Remove Flatpak applications
Flatpak apps use an Application ID (reverse-DNS), not a short name. List installed apps:
flatpak list --appExample row on my system:
Yazi io.github.sxyazi.yazi 25.4.8 stable systemUninstall by ID:
flatpak uninstall io.github.sxyazi.yaziAdd --delete-data to drop app data under ~/.var/app/. System-wide installs (system) may need sudo flatpak uninstall … depending on how the app was installed.
I did not remove the Flatpak Yazi build here because it is shared with other work on this host; the command above is the standard path from Flathub installs. If flatpak install fails with permission errors in a locked-down environment, fix Flatpak system helper access first—uninstall syntax is still flatpak uninstall APP_ID.
Uninstall from Ubuntu Software (GUI)
On Ubuntu 24.04 and newer, open App Center (or Ubuntu Software on older releases):
- Open the store from the dock or Activities search.
- Go to Installed (or the manage / library tab).
- Find the application.
- Click Uninstall or Remove and confirm.
The GUI calls the same backend as the terminal—APT for .deb packages, Snap for snaps. It is the easiest path when you do not know the package name, but it may not list command-line-only tools you installed with apt and no desktop file.
Synaptic (sudo apt install synaptic) is still available for power users: search, mark for Complete Removal (purge), apply.
Remove .deb files and manual installs
Local .deb you installed with apt
sudo apt install ./package.debRemove with:
sudo apt purge packagenameUse the package name inside the deb (dpkg -I package.deb | grep Package), not necessarily the file name.
dpkg -r / dpkg -P (low level)
Prefer apt purge for dependency handling. dpkg is appropriate when APT is confused:
sudo dpkg -r packagename # remove
sudo dpkg -P packagename # remove + purge configdpkg -r figlet left the same rc state as apt remove; dpkg -P cleared it.
Manual / compile installs
If you built from source with sudo make install, look for make uninstall in the source tree. Many projects do not ship one—you must remove files listed in the install step, often under /usr/local/bin and /usr/local/share.
AppImages and portable tarballs: delete the file and any .desktop entry you created in ~/.local/share/applications/.
Confirm the software is gone
APT packages
apt-cache policy figletWhile installed:
figlet:
Installed: 2.2.5-3After purge:
figlet:
Installed: (none)Commands on PATH
command -v cowsayNo output means the shell cannot find the binary. Some packages split the app across multiple deb names—remove every package from dpkg -S if pieces remain.
List config-only leftovers
dpkg -l | awk '/^rc/ {print $2}'Purge names you no longer need with sudo apt purge packagename.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Unable to locate package |
Wrong name or Snap/Flatpak app | Check snap list and flatpak list --app |
App gone but rc in dpkg -l |
Used remove not purge |
sudo apt purge packagename |
autoremove dropped tools you still want |
Packages were auto-installed orphans | Reinstall with sudo apt install …; pin or mark manual if needed |
| Menu icon remains after purge | .desktop from Snap/Flatpak/manual install |
Log out/in; remove stray file in ~/.local/share/applications/ |
snap remove says not installed |
Different snap name or revision | snap list --all for disabled revisions |
| Flatpak uninstall cannot find ref | Wrong APP_ID | Copy ID from flatpak list --app exactly |
Related uninstall guides
These pages go deeper when you are removing a full stack, not a single package:
- Uninstall Docker on Ubuntu
- Uninstall Python on Ubuntu (Deadsnakes, pyenv,
/usr/localaltinstall) - Install Yazi on Ubuntu — uninstall per method (
.deb, zip, Snap, Flatpak) - Remove unused packages on Ubuntu —
autoremove,clean,autoclean
Summary
To remove software on Ubuntu, first identify how it was installed, then use the matching tool: sudo apt purge for APT and Software Center .deb apps, sudo snap remove for snaps, flatpak uninstall APP_ID for Flatpaks, and manual deletion for /usr/local or portable binaries. Use apt remove when you might reinstall and want to keep /etc config; use purge or dpkg --purge to clear rc leftovers. Run apt autoremove only after you read the removal list—it can delete dependency packages you still care about. Confirm with apt-cache policy, command -v, and optionally dpkg -l | awk '/^rc/' for stragglers.
Official background: Ubuntu Help — remove applications and Ask Ubuntu — uninstall software.









