HowTo: Uninstall Ubuntu Software Packages from Command Line

In Linux the terminal/command line/shell is the most powerful tool to manage your system: you can use it for anything. You can use “Ubuntu Software Tool” from your Desktop. But if you can’t, due to one of many reasons possible, you have to do it from the command line.

To get a list of the applications installed on your system run the following command:

sudo apt --installed list | more

Using | more “pipe” command you will redirect the result of apt command via a “pipe” to more command, which show the list one page at the time. To see the next page just press space bar or q to quit.

sudo apt-get remove packagename

This will remove binaries but not the conf and data files of the package, also the dependencies installed with the package will remain on your system.

sudo apt-get remove --purge packagename


sudo  apt-get purge packagename `

Both commands do the same thing: will remove binaries, data files and config files, but not the dependencies. This is the ideal way to start allover with an app of which you messed up the config files.

sudo apt-get autoremove 


sudo apt autoremove 

This will remove those dependencies that were installed with the applications and that are no longer used by anything else on the system.

Be the first to comment

Leave a Reply