Home Terminal Tuts How to completely uninstall applications by command line in Ubuntu

How to completely uninstall applications by command line in Ubuntu

by Kiran Kumar
Published: Updated:
remove apps from terminal

Uninstalling the software from the command line via Terminal is one of the most important tasks while dealing with troubleshooting a remotely connected Ubuntu PC. In today’s Terminal Tuts session, let’s take a deep dive into it.

Uninstalling Software from Terminal in Ubuntu

The following guide is tested on Ubuntu 17.10 but should work on older Ubuntu versions as well as Linux Mint, and elementary OS.

Step 1) To uninstall a software package, you need to know the exact name of it. We shall use the tdpkg list command for it. Launch ‘Terminal’ and enter the following command:

dpkg --list

You should see a long list of applications. Note down the name of the program which you want to uninstall. For example, I want to remove VLC Media Player, which is listed as just ‘vlc’.

dpkg --list command listing all apps in Ubuntu 17.10 Terminal

dpkg –list command listing all apps in Ubuntu 17.10 Terminal

Step 2) To uninstall a program, we shall use remove command along with apt-get, which is typically used to install applications. Of course, sudo command to carry out superuser tasks. There are two important things to consider on what’s your uninstallation plan.

Keep Personalized Settings:

If you are removing a program only to reinstall later, then you may want to keep the configuration files, which will remember your settings applied in that app. In such a case, use the remove command as follows:

General format:

sudo apt-get remove package_name

In my case, to remove vlc:

sudo apt-get remove vlc

Complete Uninstallation:

On the other hand, use –purge command to completely uninstall the app if you plan not to reinstall the app.

sudo apt-get --purge remove package_name
sudo apt-get --purge remove vlc

Some Housekeeping

Now that you have uninstalled the software, you may want to do some extra cleanup to remove the dependencies of the software you uninstalled now or may be in the past. Dependencies are the apps and libraries that are used by the software you no longer have in your PC. Note that it is entirely safe to do so because no application is using them.

sudo apt-get autoremove

As you see autoremove command is generic cleaning command for any obsolete packages that are left over in your PC.

You may also like


Rick April 9, 2018 - 9:35 AM

I’m new to command line and terminal. Being a “neat freak”, I really appreciate this info on keeping my system clean…thank you!

Samuel Fontes Lima September 25, 2018 - 6:47 PM

Thank you

Arek July 16, 2019 - 11:10 AM

Thanks. A very lucid post :).

I have been struggling with removing Postman (an API tool).

Postman is a native app that has been installed to /opt and I can see its folders and files there..
however when I try to uninstall it using Ubuntu Software center, or Synaptic or apt or just list it using dpkg – all of the above do not show any postman files.
Any idea what to do??

Karl August 10, 2019 - 4:15 AM

Yep worked well. Thanks

C.k Suwarnaraj December 17, 2019 - 10:14 PM

Thank you Brother

Alan July 3, 2020 - 9:15 AM

Removed the Geary email program, thank you.

Jeavel July 6, 2020 - 11:53 AM

Thanks a lot, but how do you uninstall applications from wine?

this is my email: {redacted for privacy.}

Please email me. Thanks a lot. Enjoy your day.

Muthu Kumaran September 14, 2020 - 11:50 AM

Hello, need some help with total uninstallation of wine. I am new to Ubuntu 18.04 LTS Bionic Beaver. Can you please help me with the relevant terminal commands to completely remove wine? Thank you.

Daniel Legras December 23, 2020 - 3:00 AM

Hello, your website is very useful and your explanations are easy to understand. Thank You.

Mohamad risza August 23, 2022 - 7:37 AM

Uinstal remote confiq

Darcy Roberts December 10, 2022 - 2:05 PM

Do you have any thing on the “xdg-open” not working?


Leave a Comment



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us


©2016-2023 FOSS LINUX



“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.