How to Uninstall Packages in Ubuntu Quickly

How to Uninstall Packages in Ubuntu Quickly
Published on Jan 21, 2026 Updated on Jan 21, 2026

Package management is a core task in Linux administration. Every major Linux distribution offers a range of package managers, and familiarizing yourself with each is crucial for excelling in package management tasks. Ubuntu provides a variety of package managers, including both graphical and command-line tools. While there are multiple operations you can carry out in package management (such as installing and updating software), this guide focuses on the process of uninstalling software packages in Ubuntu.

#Prerequisites

For this guide, ensure you have the following:

#Uninstalling packages in Ubuntu

Part of package management involves uninstalling software packages. In this tutorial, we explore different methods of removing software on Ubuntu.

#Uninstall packages with APT

This is the most convenient tool for Debian/Ubuntu. The beauty of apt is its remarkable ability to handle and resolve dependencies automatically. It installs software packages hosted on default repositories and even .deb files directly. Missing dependencies often cause broken packages and, in the worst-case scenario, can lead to a broken system.

To remove a software package, use the syntax:

Command Line
sudo apt remove package-name

For instance, let’s say you want to remove the apache2 package. First, you can verify its existence by locating its binary executable using the which command.

Command Line
which apache2

The output confirms the existence of the package by listing the path of the binary executable.

Output/usr/sbin/apache2

To remove the apache2 package, run:

Command Line
sudo apt remove apache2 -y

Once uninstalled, you can run the which command again to verify its removal, and this time around, you will get no output. This confirms that the package was successfully removed from your system.

Apart from removing a single package, you can also uninstall multiple packages by passing them as arguments using the following syntax:

Command Line
sudo apt remove package_1 package_2

For example, to uninstall the bashtop and flameshot packages, run the command:

Command Line
sudo apt remove bashtop flameshot

NOTE

Some scenarios will call for the removal of residual packages that your system no longer needs. These are considered bloat, and hence, it is recommended that you remove them. You can easily remove them and conserve disk space by running.

Command Line
sudo apt autoremove -y

To completely remove a package, including its configuration files, issue the command:

Command Line
sudo apt purge package_name

In some cases, user-specific configuration files and data are stored in the .config folder during installation and remain intact despite package removal. You can manually remove them by executing:

Command Line
sudo rm -Rf ~/.config/app-name

#Remove packages with dpkg

Debian Package, abbreviated as dpkg, is a low-level package management tool. Unlike higher-level package managers like apt, dpkg does not fetch packages from repositories nor handle dependencies. It works on individual .deb packages downloaded from vendor websites and handles their installation, removal, and management.

To uninstall a package with dpkg, use the syntax:

Command Line
sudo dpkg -r package-name

NOTE

When removing the package, we specify the name of the package itself, and not the individual .deb package.

You can verify if the application is installed using the -l option.

Command Line
sudo dpkg -l |  grep package-name

For example, to check if the bashtop application is installed, run:

Command Line
sudo dpkg -l | grep  bashtop

The output confirms the existence of the package.

Outputii    bashtop   0.9.25-1    all    Resource monitor that shows usage and stats

To remove the application, we will run the command:

Command Line
sudo dpkg -r  bashtop

To confirm package removal, you can run the dpkg -l package-name command, which will return the following output.

Command Line
dpkg-query: no packages found matching bashtop

Running the which package-name command will not return any output. Both commands confirm the successful uninstallation of the package.

#Uninstall snap packages

A snap package is an application that runs in isolation in a restricted environment. It's an application that comes packaged with metadata, dependencies, and libraries and configured to run in a sandboxed environment. Given its packaging and mode of operation, a snap package is handled differently from other conventional packages.

Snaps are managed using the snap utility. The command below lists the snaps on your system.

Command Line
snap list
Outputbare             		 1.0                                      5          latest/stable  canonical✓          base
core         		16-2.61.4-20250626      17247    latest/stable  canonical✓          core
core18          		20250730                         2940     latest/stable  canonical✓          base
core22         		20250730                         2111     latest/stable  canonical✓          base
firefox           	             142.0.1-1                          6738      latest/stable  mozilla✓              -
gnome-42-2204           0+git.38ea591                   202      latest/stable  canonical✓          -
gtk-common-themes 	0.1-81-g442e511            1535      latest/stable  canonical✓          -
juju        		 3.6.9   			    32163  3/stable          canonical✓ 	       -
postman         	            11.62.7                                  351    v11/stable     postman-inc✓      -
snapd                 	2.71                                 25202     latest/stable  canonical✓          snapd

To remove a snap package, use the syntax:

Command Line
sudo snap remove package_name

For example, to remove the postman snap package, run:

Command Line
sudo snap remove postman

To remove multiple snap packages simultaneously, specify them using the same command shown. Here, we are removing firefox and juju snaps.

Command Line
sudo snap remove juju firefox

#Uninstall packages using Ubuntu App Center

Ubuntu App Center offers a reprieve thanks to its simple and intuitive UI for users not comfortable working on the CLI interface. Everything is intuitive, from listing installed software to searching and installing apps from the default repositories. It handles both traditional and snap packages, creating a holistic package management approach. Doing so eliminates the need for the previously covered CLI tools.

To launch it, click the app icon.

ubuntu-app-center-icon

To uninstall a package, simply search for it and hit ENTER. In this example, we have searched for Firefox. Upon clicking the drop-down menu, select the Uninstall option.

uninstall-package-ubuntu-app-center

Be sure to provide your user account’s password to continue with the uninstallation.

#Uninstall Flatpak packages

Just like snaps, Flatpak packages are handled differently and are managed using the flatpak utility. To list the Flatpaks on your system, run:

Command Line
flatpak list
OutputName                                       Application ID                                     Version            Branch             Installation
Bella                                      io.github.josephmawa.Bella                         0.1.6        stable                   system
Resources                            net.nokyan.Resources                                  1.8.0         stable                   system
Mesa                                     org.freedesktop.Platform.GL.default          25.2.2      24.08                    system
Mesa (Extra)                        org.freedesktop.Platform.GL.default          25.2.2      24.08extra           system
openh264                             org.freedesktop.Platform.openh264           2.5.1       2.5.1                     system
GNOME Application Platform version 48      org.gnome.Platform                          48                        system

To remove a flatpak package, use the syntax:

Command Line
sudo flatpak uninstall  flatpak_Application_ID

For example, to uninstall the Bella flatpak, run the command:

Command Line
sudo flatpak uninstall io.github.josephmawa.Bella 
Command Line
sudo flatpak uninstall io.github.josephmawa.Bella 

Press Y when prompted and hit ENTER.

You can use the --delete-data option to remove the Flatpak package along with user data to free up more space. Here's an example.

Command Line
sudo flatpak uninstall --delete-data net.nokyan.Resources

NOTE

To save up disk space and optimize your system, uninstall any remaining Flatpak runtimes and extensions no longer needed by any installed Flatpak apps.

Command Line
flatpak uninstall --unused

To simplify the uninstallation and overall management of Flatpaks, you can use Warehouse. This is a Flatpak package that offers a GUI experience in Flatpak management. Just like Ubuntu App Center, it allows you to search, check app details, and install/uninstall flatpaks.

To install warehouse, run the command.

Command Line
flatpak install flathub io.github.flattool.Warehouse

Upon installation, launch it and select the flatpak to remove. Then click the uninstall option.

uninstall-package-ubuntu-app-center

Once uninstalled, the Flatpak will not appear on the list of Flatpak packages.

Linux Dedicated Servers with Full Control

Optimize your workloads with customizable Linux bare metal servers, offering high-performance processors, reliable storage, and full root access.

#Best practices and tips

As a general rule, use the apt tool when removing packages installed from official repositories. It's the most recommended approach, as it automatically handles dependencies, avoiding dependency errors.

The dpkg utility primarily handles downloaded .deb packages and should be limited to uninstalling packages installed manually (using the dpkg -i .deb command).

Lastly, snap and Flatpak packages should be handled separately using the snap and flatpak tools owing to their architecture and how they run.

#Conclusion

That was a summary of various tools and channels to employ when uninstalling software packages in Ubuntu. Software removal is often a routine task, ensuring that applications that are not needed are removed. This keeps the system lean and free from bloat. We trust you now have adequate knowledge of uninstalling software on your system.

Cloud VPS Hosting

Starting at just $3.24 / month, get virtual servers with top-tier performance.

Share this article

Related Articles

Published on Jan 12, 2026 Updated on Jan 12, 2026

Advanced Linux Commands for Intermediate Users

Master advanced Linux commands for intermediate users, covering text processing, process control, networking, and system administration to manage servers efficiently.

Read More
Published on Nov 24, 2025 Updated on Jan 21, 2026

How to Run Linux Commands on Windows (WSL, Git Bash & More)

Learn how to run Linux commands on Windows using WSL, Git Bash, Cygwin, or virtual machines. Compare methods and choose the best setup for your workflow.

Read More
Published on Nov 14, 2025 Updated on Nov 14, 2025

8 Best Linux Distros for Server Hosting

Discover the best Linux distros for server hosting with pros, cons, and use cases to help you choose the right, stable, secure OS for your cloud or bare-metal servers.

Read More
We use cookies to ensure seamless user experience for our website. Required cookies - technical, functional and analytical - are set automatically. Please accept the use of targeted cookies to ensure the best marketing experience for your user journey. You may revoke your consent at any time through our Cookie Policy.
build: 161b07edc.1592