Ubuntu should be smart enough to realize to remove <application-name>.desktop when the program not installed anymore.

Asked by Pranav bhattarai on 2020-02-05

I have experienced this a lot.

If u notice this screenshot image: https://imgur.com/a/qnatmJ4 ; here is the list of two icons of those programs which do not exist anymore. I have uninstalled them like a month ago.
Those apps are:
MiPCSuite
Uninstall MiPCSuite

But sadly I can't find a way to remove them from the "All application" list.

Basically any program which you have installed from outside Apt repo & Ubuntu Store; there is the chances you might run into this problem.

The thing is this 'action of removal of the uninstalled programs' should be done by OS itself. It's not a thing for users like us to waste a time upon. Since we all know, Ubuntu is famous for being noob friendly.

Please do something about this.
Automation is lacking here in this field.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2020-02-07
Last query:
2020-02-07
Last reply:
2020-02-07

This question was reopened

How did you install the MiPCSuite? Did you install it using WINE?

If you look irun:

grep -i MiPCSuite /usr/share/applications/*

You will probably find the icon name

I tried to look into /usr/share/applications/ is no MiPCSuite. Because I have refresh gnome-shell using "Alt F2" and type "r".

"sudo apt remove --purge wine" command a month ago. All resided its option in, "Open software with" or "run application with" etc. Which doesn't make sense, since I have used the "purge" option but that is useless.

Ubuntu is dumb in many portions. Its not smart enough to clean itself.

Did you install the application using WINE? You haven't answer my question.

If you did then look in

~/.local/share/applications

Source:
https://askubuntu.com/questions/483939/how-to-remove-uninstalled-wine-app-icons-from-unity-dash

Uninstalling WINE or *any* application does not remove it's configuration from home. It may be required. An option as part of apt or dpkg would be nice but Windows does exactly the same with applications. Registry nonsense and orphaned DLLs are left after many applications are removed.

Uninstalling open source applicatons in Windows *also* leaves the old config in the "Local Settings" folder...so Windows is dumb too.....

Windows is way dumber but that doesn't mean Ubuntu needs to be dumb too.

Meanwhile, the problem is solved but I am sure a lot of Ubuntu users will like to have these kinds of issues again and again.

I installed Wine, yes. But I uninstalled it & purged it using an apt command like a month ago.

When I go to Synaptic Package Manager > Custom Filters > Missing Recommends; I see six packages telling me to install. As u can see here: https://imgur.com/a/XpPGpBh

This means these programs are partially still installed.

Why can I remove these partially installed packages which I thought I have uninstalled using apt command.

Note: I have installed both Windows & Linux versions of "Mi PCSuite".

WINE and any other install will not remove data from $HOME

This is why people uninstalling and reinstalling applications as a fix for anything is futile. The per-user configuration is not removed so achieves nothing. Its the same in Windows.

If you use:

sudo apt-get --purge autoremove

The package dependencies will be removed as well.

Or you can run:

sudo apt-get -f install

To make the package ls resolve deps and sort out the package system

Manfred Hampl (m-hampl) said : #8

You seem to misinterpret the information from synaptic in "Custom Filters > Missing Recommends".

A software package can depend on another one, it can recommend another one and it can suggest another one.

Your system has some package installed, which recommends another one, but that second one is not installed.
This is a healthy situation and quite normal.

There are no "broken dependencies" that need to be solved.
And the packages that are shown aren't partly installed.

some more details here: https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-depends

Manfred Hampl (m-hampl) said : #9

And to your original question
"Ubuntu should be smart enough to realize to remove <application-name>.desktop when the program not installed anymore."

Do you really want that Ubuntu starts deleting files without your order?

Thanks Manfred Hampl, that solved my question.

Do you really want that Ubuntu starts deleting files without your order?
Yes, I want Ubuntu to remove everything (i.e packages) which came with the program installed.
No, if there is a project folder which I created using that program.
For example, if I use the command to uninstall Netbeans, then I want Ubuntu to wipe everything except the project folder user created. (sudo apt install netbeans && sudo apt remove --purge netbeans; should be clean.)

This is why I can't experiment using different desktop environments.

If I let say, I want to install and try KDE then later when I don't like it, I can't easily wipe everything that came as "meta-packages" which came with "sudo apt install KDE".
I have to manually search and remove every component myself. So much waste left behind. And sometimes some meta-packages are also of GNOME, if I by mistake remove let say AAA meta-packages which needs by KDE & GNOME, then I will start to have a big problem.

It's sad that things are not easily reversible. Reverse Engineering is lacking here.

Users can install the Desktop environment easily but they can wipe it clean.

Are you saying there is no future where we achieve this sort of intelligence from Ubuntu?

The application files created were not part of packages so aren't removed with the packages. Yes they were made using the application but the package doesn't remove that. This is normal.

You wouldn't want to uninstall Libreoffice and all the files that open with Libreoffice that you made using Libreoffice also get deleted now, would you? This is what you are saying!

The files are user data so don't get removed. The system can't guess what you want so they are left. It makes sense.

This is the same in Windows. Install Virtualbox in Windows and create a virtual machine. You don't have to install anything to it.
uninstall Virtualbox and look in your local settings folder. You may want to keep your VMs (i know I would) so they are still there. It's exactly the same.

Thanks actionparsnip, that solved my question.