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*
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.
4 comments
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:
zoom
What else can I do?
Hello Kevin, you probably have a broken dependencies. Please try “sudo apt-get install -f” command in the Terminal.
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?
Hello Kiran,
I forgot to mention OS, it is Ubuntu