Nasty problem with ubuntu-mate-desktop, ubuntu-mate-core, etc dependency

I had unusual luck today when it became known to me that you musn’t remove anything at all in Ubuntu 16 Mate, I say “luck” because I almost did it myself, and I might not be here if that had happened.

Whenever you try to remove any package you’re told that ubuntu-mate-desktop , ubuntu-mate-core or something similar will also be removed.

There’s some threads about this already saying it’s ok if those packages are removed but here’s the catch: when you run something like sudo apt-get autoremove then a lot of stuff will be removed from the system as well. This “a lot of stuff” is what you see in the Depends section of apt show ubuntu-mate-desktop. I bet this will easily break the system.

There seems to be a good reason that things are like this now but most people including myself couldn’t imagine it, and there’s no warning about it

So if you’re wanting to remove any of the programs you don’t want, replace them by your preferred programs, downgrade or things like that, you can’t do it without risking the whole OS :disappointed:
In previous Ubuntu Mate releases you don’t have this problem, e.g. you could uninstall unnecessary software and nothing else just fine.

Hi @Staynluss,

you need to be a lot more informative as to what you were doing and why you make your opening statement, there isn’t enough info to go on if you want someone’s help!. :thumbsdown:

Tell us exactly what you were doing which led you to make this post in the first place as I have no idea what you are talking about to be honest!. :confused:

LOL true @wolfman
When I was creating this thread I got a notif from the other one. To prevent losing what I’d already written I just posted it as it was and added three dots at the end. I will update it soon with the deatiled info…

Is this a problem under 16.04? I don’t have ubuntu-mate-desktop or ubuntu-mate-core installed, and I don’t recall it offering to auto remove packages for the rest of the system. :confused:

A workaround is to say “Listen Apt, I want to keep these installed” by doing:

sudo apt install [packages that were going to be removed]

@lah7 I installed 16.04 and have that problem. What packages are listed if you type apt-get autoremove (I certainly don’t need to tell you this but do not actually let the command initiate!) ? If you reinstall ubuntu-mate-desktop are those very same packages listed in Depends when doing apt show ubuntu-mate-desktop ?

About the workaround, do you mean reinstalling the removed packages? or do you mean marking them as manually installed? I was told this worked in previous versions but wasn’t assured apt-get install still marks the package as manually installed in the current release

Interesting @lah7 I do have ubuntu-mate-core installed on a fresh install of Ubuntu MATE 16.04

Not that I suggest this for everyone @Staynluss, but my daily routine on this laptop is to manually update, upgrade, & autoremove [I use __apt__ not apt-get] & I’ve never had anything broken by this method.

I read the dependency problem is there no matter if you install Mate or if you fresh install Ubuntu Mate

I myself used to not use autoremove unless the list was so big I would notice it when installing programs. When this happened I always held my finger above the Enter key while staring at the list for some seconds before thinking “the computer itself told me I can remove them so what could go wrong?” and giving the command. I will not do that again

@pfeiffep I was told apt install and apt-get install are now the same.

I’m at a bit of a loss, I had thought of a possible reason, but I can’t re-produce it in the live session as a test. :confused:


Meta packages are “removed” automatically when you remove a package that’s “on the list”, like HexChat and Pidgin (default Ubuntu MATE apps - ubuntu-mate-desktop). This doesn’t break the system at all.

sudo apt remove hexchat

The following packages will be REMOVED:
  hexchat ubuntu-mate-desktop

autoremove does not have anything to remove.


I tried to explicitly remove/purge ubuntu-mate-desktop, but autoremove does not try to remove other packages with the system.


To answer your question @Staynluss:

  • IIf I install one of the meta packages, it’ll install the packages that are “missing” in that “list”.
  • The workaround I suggested is before you run autoremove, it’s like manually installing them, despite they’re already installed. I found this to work when autoremove planned to remove that package.

Here’s a topic with clarification on “meta packages”:


Please tell us which packages autoremove wants to remove and we’ll confirm if they’re part of our system or just no longer needed.

2 Likes

So it still works? if so, how do I mark all those Depends packages at once? (the problem? if I copy and paste from the terminal output of apt-show they will have some line breaks that will split the apt-get install command)

Are you telling me to remove ubuntu-mate-desktop / ubuntu-mate-core to see what autoremove lists afterwards? it sounds risky. Is there a way to go back after checking the list?

I’m failing to understand how this is pertinent to your OP … man pages indicate more options are available when using apt-get

I believe the -s option will NOT result in removal

-s, --simulate, --just-print, --dry-run, --recon, --no-act
           No action; perform a simulation of events that would occur based on the current system state
           but do not actually change the system. Locking will be disabled (Debug::NoLocking) so the
           system state could change while apt-get is running. Simulations can also be executed by
           non-root users which might not have read access to all apt configuration distorting the
           simulation. A notice expressing this warning is also shown by default for non-root users
           (APT::Get::Show-User-Simulation-Note). Configuration Item: APT::Get::Simulate.

Maybe not directly, but an important little trick still if they were the same

@pfeiffep ok, I’ll use the -s option. Does it also work with autoremove? if not, how do I make autoremove ask for confirmation, so as to see the list and then cancel the command?

Yep. -s simulates autoremove too.

No, but I may have misread your original post. I have been thinking there is a problem on your system where the removal of one ubuntu-mate-* packages is trying to take down the rest of the system, which shouldn’t happen.

If you are trying to autoremove and it’s asking to remove packages you’re unsure of, then please share here.

1 Like

When I simulatedly run apt-get remove or apt-get purge for ubuntu-mate-desktop and ubuntu-mate-core, followed by apt -s autoremove, none of the packages listed in either package’s Depend section are uninstalled.
This is not what I was told would happen, maybe it’s because I’m only simulating?.. @lah7 said he can’t reproduce on a live session, and I assume he used real commands, so this is probably not the reason.

I think I could have uninstalled and reinstalled ubuntu-mate-desktop earlier when I didn’t know about this issue. Maybe this is why I’m not seeing the long autoremove list? or maybe I’ve already marked those packages as manual? how do I check this?

Try running the following terminal command (Ctrl + Alt + t) if there are any missing dependencies:

sudo apt-get update && sudo apt-get dist-upgrade -f

See also:

sudo apt-get --fix-missing install

The above command downloads and installs any missing packages on your system.

sudo apt-get --fix-broken install

The above command downloads and installs any broken dependencies on your system.

1 Like

I don’t like this part, and I wouldn’t like to apply it now just after reading the Clarification thread this bit of the man page: [quote] it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist−upgrade command may therefore remove some packages [/quote]

Missing packages as in missing dependencies, missing packages that make use of installed dependencies, or missing packages from the original metapackage?

Removal of a meta-package creates a situation where apt autoremove wants to remove the desktop.

YES!! Its happen to me on a couple of occasions and I found it to be apt getting hung up. The only way I was able to correct this was to let autoremove go ahead and remove everything. Then I had to go to console and install the meta-pack, bringing everything back. I then tried the whole process again of removing a package (which removed the meta-pack) and this time it worked. Autoremove would no longer try to remove the desktop. For reasons unknown, apt was hung up and I needed to let it run its course to clear it out. This has worked twice for me.

On a side note, dist-upgrade is what our current package manager uses when upgrading your system.

-s will simulate these also

Hi. Has it happened to you on version 16?

I truly do not remember which version it was. But it did first happen when I still ran Ubuntu (before switching to mate).