How To: Completely Remove Software In Ubuntu

Today’s article is going to show you how to completely remove software in Ubuntu. This will also work for other distros that use apt as their package manager. It’s a pretty handy tool to have in your toollbox, because we’ll not only be removing software, we’ll also be removing any config files associated with said software. It’s not all that difficult, and anyone should be able to understand this article.

When you ‘remove’ software, be it with the GUI or with the terminal, you’re actually only removing the software itself. You’re often leaving behind the config files (if there are any) and the ‘remove’ may leave dependencies still installed. The reasoning for leaving config files behind is presumably so that you can reinstall the software and have the same configurations you had earlier in time.

As you can guess, that’s not always a good thing… It may well be those configuration files that caused some sort of error in the first place. It may well be those config files that prompted you to remove the software in the first place. Erasing and starting anew might be your only realistic path forward, especially if reverting to backups did not work.

So… That’s why we have this article. This article is going to teach you how to completely remove software in Ubuntu. If you want, you can still try removing software and reinstalling (as a troubleshooting step), and this then becomes one of your later troubleshooting strategies. Read on, and you’ll see…

Completely Remove Software In Ubuntu:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

When you remove software with the terminal, you probably do it like so:

That’s great. It removes the application and may even remove some of the dependencies it pulled in when you installed it. This is not necessarily a bad thing – but we want to completely remove software in Ubuntu, and this is how you do it.

As I said in the preamble, using the above command will likely leave your configuration files behind (if there are any) and some dependencies. With the ‘purge’ command, you’ll get rid of those configuration files. To do this, you’ll want to:

While that’s great and all, when you installed your application you may well have installed some other applications (dependencies), that is some applications that the software depended on. Those too may have config files related with them and to really ensure you’ve completely removed the software, you’ll want to do an autoremove. 

If you’re unfamiliar with the autoremove function of apt, the man page has it summed up nicely:

autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed as dependencies changed or the package(s) needing them were removed in the meantime.

You don’t specify an application with the ‘autoremove’ command,  you just run:

That should do it, actually. The last command should remove any dependencies that were installed and not removed automatically when you purged the software with the commands above.


And there you have it! It’s another article! I still haven’t missed a day, and I’m well beyond my initial obligations. This time, the article tells you how to completely remove software in Ubuntu – and it’ll work in any distro that uses apt. It’s a pretty simple thing, but it’s worth knowing. Eventually, it’s bound to come in handy.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe to Newsletter!
Get notified when new articles are published!
We promise to never share your email!

Author: KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Leave a Reply

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

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.