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.

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of FOSSLinux.com. I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities, especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. I hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more and spread Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!

4 COMMENTS

  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:
    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.

  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?

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,437FansLike
375FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

How to change Hostname on Ubuntu

Generally, a hostname is just an assigned name to a computer, laptop, or any other connected device to a network. You can say a hostname is a computer's nickname, and it is used to identify the machine over the network uniquely.

Manjaro vs. Ubuntu – which is better for you?

If you are a person associated with Computer technology and spend most of the time in the open-source arena, you must have heard or worked with some of the popular Linux distributions we have in the market. Some of the names that you will never miss are; Ubuntu, Arch Linux, Debian, and Mint.

9 Useful Tips Working with Operating System using Python

There are several situations when we want to work with the operating system using python. We may want to see the user details or want to do some tasks with the files and directories. If you are a system administrator, you will find it useful to work with Operating System as one can easily automate some repeating tasks of the Operating System using python.

System76 Lemur Pro Review

Buyers who wish to go for a machine that is based on Linux often show interest in Chromebooks due to the form factor and extended battery life capabilities. Although ChromeOS power these machines, users can still miss out on a more genuine Linux experience. For those who happen to agree, the new Lemur Pro by System76 might get some heads turning.

Top 10 New Features in Linux Kernel 5.8

Linus Torvalds recently announced the release of Linux Kernel 5.8, and he seems delighted with it. He has pointed it out as the most significant release of all time. To developers, this new kernel comes with an addition of 800,000 new code lines and more than 14,000 changed files. To the average user, you might not see many eye-candy changes, as seen in the earlier releases.

How to install Flutter on Linux

Do you want to install Flutter and start creating awesome Android and iOS applications? Then you have come to the right place. Here is a comprehensive tutorial on how to install Flutter on Linux. If you are new to Flutter, don't worry, we got that covered too as we shall go in-depth understanding of Flutter and what it brings to the table.

MUST READ

Buyers who wish to go for a machine that is based on Linux often show interest in Chromebooks due to the form factor and extended battery life capabilities. Although ChromeOS power these machines, users can still miss out on a more genuine Linux experience. For those who happen to agree, the new Lemur Pro by System76 might get some heads turning.
Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.

6 ways to find out your Linux file system type

Any Operating system in the market whether its Windows, Linux, Unix, macOS, and any other, must be able to access and manage files and data on storage devices.

15 Tar command in Linux uses with examples

Tar is a famous utility that is basically used for collecting multiple files in a single archive. This file is often called a 'tarball'. Today, we are going to tell you about the different things you can do with tarballs using the tar command, with practical examples.

CentOS Vs. Ubuntu Server : Everything You Need to Know

Choosing the perfect Linux distribution to set up your server can be confusing since Linux provides a limitless number of options. The main reason behind these many distributions is because Linux is an opensource platform. Anybody with the required skills can contribute to the development or build and release their distribution. Currently, there are more than 600 Linux Desktop and Server distributions in the market.

Top 5 Linux Distros for Windows Users

When Microsoft initially released Windows 7 in October 2009, the software giant committed to providing ten years of support for its popular operating system.  The much-maligned Microsoft was true to their word, support for Windows 7 ended just yesterday a little over ten years after its release.