Remove a partially uninstalled app on elementary OS, Ubuntu

Got stuck with a broken dependency, and so you are not able to install or uninstall a program? You are not alone; it is a common problem that could happen to anyone. This article guides you on how to use the command-line way to remove the traces of the broken package altogether.

Not all applications installation and uninstallation go smoothly. Sometimes application installation and uninstallation get interrupted or frozen due to various reasons such as a badly packaged app or accidental deletion of dependencies.

What this does is leaves traces of the program on your computer. Sometimes these traces are enough for elementary OS to think the app is installed correctly, while it isn’t. Moreover, the system won’t even let you reinstall the application. So you are stuck with a program that won’t work.

“App Center” isn’t useful in such a case as the program doesn’t show up in the list, assuming it was installed from there. It’s now time to go the command line way to delete the corrupt program.

We shall use the PURGE command. On my test PC, the application ‘Elementary Tweaks’ got partially uninstalled, and I’m going to use this scenario as an example for illustration.

Completely Remove Partially Installed Program

STEP 1: The first thing to know is the installed package name of the program you want to remove. Go to ‘Applications’ and launch ‘Terminal.’ Type the following command and hit enter. Make sure to replace [program name] with your program’s name.

sudo dpkg -l [program name]*

In my example, I will search for elementary-tweaks.

sudo dpkg -l elementary-tweaks*

Uninstall using purge command
Uninstall using the purge command

In my case, the package name is the same. It may not be the same in your case. You will see the package name listed in the Terminal along with Name, Version, Architecture, and Description.

STEP 2: The next step is to use PURGE and remove the installed package. The generic format is:

sudo dpkg --purge [package name]

Replace the [package name] with your package name.

For my scenario, the command looks like this:

sudo dpkg --purge elementary-tweaks

Most of you should be good at this point, but for some an additional step may be needed if you still have broken dependencies. I suggest they run the following command-line in the Terminal.

sudo apt-get install -f

That’s it. The program should be entirely gone by now. Did it work for you? Do let us know in the comments below.

Related Articles


  1. Hi Kiran, this is the closest I’ve been to solving this. However I got an additional message:

    error processing package zoom (–purge):
    package is in a very bad inconsistent state; you should
    reinstall it before attempting a removal
    Errors were encountered while processing:

    What else can I do?

    • Hello Kevin, you probably have a broken dependencies. Please try “sudo apt-get install -f” command in the Terminal.

  2. Hello Kiran,
    I tried to install Pycharm Community Edition but could not get through, now I wish to remove any traces of earlier installation of Pycharm Community. I tried running above commands but in vain. can you pl. help?


Please enter your comment!
Please enter your name here


Latest Articles


How to install and run Powershell on Fedora Linux

PowerShell built upon the .NET Core framework is a powerful open-source command-line shell developed and maintained by Microsoft. It is a cross-platform (Windows, macOS, and Linux) automation and configuration tool that works well with your existing tools. It includes a command-line shell and an associated scripting language.


More Articles Like This