• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

TinyGrab

Your Trusted Source for Tech, Finance & Brand Advice

  • Personal Finance
  • Tech & Social
  • Brands
  • Terms of Use
  • Privacy Policy
  • Get In Touch
  • About Us
Home » How to Uninstall Apps on Linux?

How to Uninstall Apps on Linux?

March 25, 2025 by TinyGrab Team Leave a Comment

Table of Contents

Toggle
  • How to Uninstall Apps on Linux: A Comprehensive Guide
    • Uninstalling via Package Managers
      • APT (Debian, Ubuntu, Mint, Pop!_OS)
      • YUM (CentOS, RHEL – Older Versions)
      • DNF (Fedora, RHEL 8+, CentOS Stream)
      • Pacman (Arch Linux, Manjaro)
      • Snap Packages
      • Flatpak Packages
    • Uninstalling Applications Compiled from Source
    • Frequently Asked Questions (FAQs)
      • 1. How do I know which package manager to use?
      • 2. What’s the difference between apt remove and apt purge?
      • 3. Why do I need sudo to uninstall applications?
      • 4. Can I uninstall multiple applications at once?
      • 5. What are dependencies, and why is it important to remove them?
      • 6. What if I don’t know the exact package name?
      • 7. Is it safe to manually delete files to uninstall an application?
      • 8. How can I uninstall a program if I forgot how I installed it?
      • 9. What are Snap and Flatpak, and why are they different?
      • 10. Will uninstalling an app remove my user data?
      • 11. What if the uninstall command fails?
      • 12. Where can I find more help or documentation?

How to Uninstall Apps on Linux: A Comprehensive Guide

So, you’ve bravely ventured into the world of Linux, installed a few applications, and now find yourself needing to declutter? Excellent! Uninstalling software on Linux isn’t always as straightforward as dragging an icon to the trash, but it’s a powerful and surprisingly flexible process once you understand the underlying principles. Essentially, the method you’ll use to uninstall an app on Linux depends on how you installed it. If you used a package manager (the most common scenario), that’s your go-to. If you compiled from source, you’ll need to revisit the build directory. Let’s dive in!

Uninstalling via Package Managers

This is the most common and recommended way to install and uninstall applications on Linux. Package managers like APT, YUM, DNF, and Pacman handle dependencies, configuration files, and other important aspects of software management, ensuring a clean and stable system.

APT (Debian, Ubuntu, Mint, Pop!_OS)

APT (Advanced Package Tool) is the workhorse of Debian-based systems. To uninstall an application installed via APT, use the following commands:

  • sudo apt remove <package_name>: This command removes the application’s binaries but leaves configuration files intact. This is useful if you plan to reinstall the application later and want to preserve your settings.
  • sudo apt purge <package_name>: This command removes the application’s binaries AND its configuration files. This is a complete uninstall and is recommended when you are sure you no longer need the application.
  • sudo apt autoremove: This command removes orphaned dependencies, which are packages that were installed as dependencies of an application that is now removed. This helps keep your system clean and efficient.

To find the exact <package_name>, you can use:

  • dpkg -l | grep <application_name>: This lists all installed packages and filters the results by the application name (or a part of it).
  • apt list --installed | grep <application_name>: A more user-friendly way to list installed packages and filter them.

Example: To completely uninstall the “gimp” image editor, you would use:

sudo apt purge gimp sudo apt autoremove 

YUM (CentOS, RHEL – Older Versions)

YUM (Yellowdog Updater, Modified) was the package manager for older versions of CentOS and Red Hat Enterprise Linux (RHEL).

  • sudo yum remove <package_name>: Removes the specified package and its dependencies that are no longer needed by other packages.

To find the <package_name>, you can use:

  • yum list installed | grep <application_name>

Example: To uninstall the “httpd” web server, use:

sudo yum remove httpd 

DNF (Fedora, RHEL 8+, CentOS Stream)

DNF (Dandified YUM) is the successor to YUM and is used in Fedora, RHEL 8 and later, and CentOS Stream. It generally works the same way as YUM, but with some performance improvements and new features.

  • sudo dnf remove <package_name>: Removes the specified package and its dependencies that are no longer needed.
  • sudo dnf autoremove: Removes orphaned dependencies, similar to APT.

To find the <package_name>, you can use:

  • dnf list installed | grep <application_name>

Example: To uninstall the “firefox” web browser, use:

sudo dnf remove firefox sudo dnf autoremove 

Pacman (Arch Linux, Manjaro)

Pacman is the package manager for Arch Linux and its derivatives. It’s known for its simplicity and speed.

  • sudo pacman -R <package_name>: Removes the specified package.
  • sudo pacman -Rs <package_name>: Removes the package and its unneeded dependencies.
  • sudo pacman -Rns <package_name>: Removes the package, its unneeded dependencies, and its configuration files. This is the equivalent of apt purge.

To find the <package_name>, you can use:

  • pacman -Q | grep <application_name>: Lists all installed packages and filters the results.

Example: To completely uninstall the “vlc” media player, use:

sudo pacman -Rns vlc 

Snap Packages

Snap is a universal package manager developed by Canonical (the company behind Ubuntu). Snaps are containerized applications that run in isolation from the rest of the system.

  • sudo snap remove <snap_name>: Removes the specified Snap package.

To list installed Snap packages, use:

  • snap list

Example: To remove the “discord” Snap package, use:

sudo snap remove discord 

Flatpak Packages

Flatpak is another universal package manager that aims to provide a consistent experience across different Linux distributions. Like Snaps, Flatpaks are containerized.

  • flatpak uninstall <package_id>: Removes the specified Flatpak package.

To list installed Flatpak packages, use:

  • flatpak list

Example: To remove the “org.gnome.gedit” Flatpak package (the GNOME text editor), use:

flatpak uninstall org.gnome.gedit 

Uninstalling Applications Compiled from Source

If you built an application from source code (e.g., by downloading a .tar.gz archive, running ./configure, make, and sudo make install), there’s no central package manager to handle the uninstallation. You’ll need to manually remove the files.

  1. Check the README or INSTALL file: These files often contain instructions for uninstalling the software. Look for sections on “uninstalling” or “removing.”
  2. Revisit the Build Directory: Go back to the directory where you compiled the application. Sometimes, running sudo make uninstall from that directory will remove the files.
  3. Manual Removal (if all else fails): If there’s no uninstall option, you’ll have to identify and delete the installed files manually. This is the least desirable option and requires careful attention. The whereis <application_name> command can help you locate the installed binaries. Also, check /usr/local/bin, /usr/bin, /usr/local/sbin, and /usr/sbin for binaries.

Important Note: Manually removing files can be risky if you delete the wrong files. Always double-check before deleting anything!

Frequently Asked Questions (FAQs)

Here are some common questions related to uninstalling applications on Linux:

1. How do I know which package manager to use?

The package manager you use depends on your Linux distribution.

  • Debian, Ubuntu, Linux Mint, Pop!_OS: APT
  • Fedora, RHEL 8+, CentOS Stream: DNF
  • CentOS, RHEL (older versions): YUM
  • Arch Linux, Manjaro: Pacman

If you installed using Snap or Flatpak, use the corresponding snap or flatpak commands.

2. What’s the difference between apt remove and apt purge?

apt remove removes the application’s binaries, while apt purge removes both the binaries and configuration files. purge offers a cleaner uninstall.

3. Why do I need sudo to uninstall applications?

Uninstalling applications typically requires root privileges to modify system files. sudo grants you temporary root access.

4. Can I uninstall multiple applications at once?

Yes, you can usually specify multiple package names in a single command, separated by spaces. For example: sudo apt remove gimp vlc firefox

5. What are dependencies, and why is it important to remove them?

Dependencies are other packages that an application relies on to function. Removing orphaned dependencies (those no longer needed by any installed application) helps free up disk space and reduces potential conflicts.

6. What if I don’t know the exact package name?

Use the commands mentioned above (e.g., dpkg -l | grep <application_name>) to search for the package name based on a keyword or application name.

7. Is it safe to manually delete files to uninstall an application?

Manually deleting files should be a last resort. It’s risky and can lead to system instability if you delete the wrong files. Always try the package manager method first.

8. How can I uninstall a program if I forgot how I installed it?

This can be tricky. Start by listing installed packages using your distribution’s package manager (e.g., dpkg -l for Debian/Ubuntu, rpm -qa for Fedora/CentOS/RHEL). Look for the application in the list. If it’s not there, it might have been compiled from source.

9. What are Snap and Flatpak, and why are they different?

Snap and Flatpak are universal package managers that allow you to install applications across different Linux distributions. They containerize applications, providing isolation and consistent behavior. They differ in their underlying technologies and management by different organizations (Canonical for Snap, freedesktop.org community for Flatpak).

10. Will uninstalling an app remove my user data?

Generally, uninstalling an application through a package manager will not remove your user data (e.g., documents, saved games, settings stored in your home directory). User data is usually stored separately from the application’s system files. However, apt purge will remove system-wide configuration files, but these typically don’t contain user-specific data.

11. What if the uninstall command fails?

If the uninstall command fails, check for error messages. Common causes include insufficient permissions (ensure you’re using sudo), incorrect package name, or broken dependencies. You might need to try fixing broken dependencies using the package manager’s tools (e.g., sudo apt --fix-broken install for APT).

12. Where can I find more help or documentation?

Consult your Linux distribution’s documentation or online forums. The man pages for your package manager (e.g., man apt, man dnf, man pacman) provide detailed information about its usage. Online searches for specific error messages or issues can also be helpful.

Filed Under: Tech & Social

Previous Post: « How much money does a caddy make at the Masters?
Next Post: How to get blocks in Amazon Flex? »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

NICE TO MEET YOU!

Welcome to TinyGrab! We are your trusted source of information, providing frequently asked questions (FAQs), guides, and helpful tips about technology, finance, and popular US brands. Learn more.

Copyright © 2025 · Tiny Grab