Shell ist Dangerous... apt-get killed my system options

Hey guys,

it’s me again,
this time i have a real problem :frowning:
i had problem with pip
and thats why i queried some commands like

sudo apt-get purge python3
sudo apt-get autoremove python3
sudo apt-get autoremove
and some other stuff like that.
so here ist the problem

My firefox was gone and also some of my system options (especially the additional drivers utility)
also the update option is gone now.
Anyway to get this stuff back ?

Thanks in advance for your help

Best regards

Nope, can’t do that :slight_smile: I think the easiest way to restore would be…

sudo apt install --reinstall mate-desktop-environment-core

I think that will restore your desktop and of course python3.


Hi @Pinguincommander,

you could also run the following terminal command which should fix anything missing on your system that is system critical?:

sudo apt-get install -f

Isn’t python3 an important part of UM?. :smiley:

1 Like

HI @wolfman @anon42388993

i tried the ideas of you but none of them worked
the idea of v3xx did something, but i didn’t notice an effect
and wolfmans suggestion just tells me everythin is fine :frowning: and i have one package not needed.
so any other packages to install or. reinstall ?
I not that deep in Linux business especially the additional drivers and the upgrade is missing(also the software boutique)
Python is already up again (I installed it yesterday).

Hope you have some other ideas.

Best regards

Hi @Pinguincommander,

try the following although I don’t think it will do much but you never know, before running the command, change your software sources download location and reload your sources list:

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

Hi wolfman,

sry for the late response.
Of course it didn’t work… it did something but not what i needed :frowning:

Hi PC,

have you tried removing FireFox and re-installing it again?.

Open a terminal (Ctrl + Alt + t) and paste the following command then log out/in once done:

sudo apt-get update && sudo apt-get remove firefox && sudo apt-get install firefox

You can also try changing your software sources download location and see if that helps?:

Hey guys,
after long time of trying i just gave it up and reinstalled just the whole system.


To avoid further problems like this, do not use pip on the system python installation. In fact, by default, Ubuntu-MATE will never install it for you. If you notice on your new installation, it isn’t there.

If you wish to program in python here’s what you should do:

  1. Install and use pyenv. A very nice tutorial of its capabilities is here:, Pyenv will allow you to install python distributions in your home folder and use those instead of the system python for all your needs (programming or otherwise).

  2. Don’t try to manually update any packages in your system python versions (in Ubuntu-MATE 16.04, you have two installations, currently 2.7.12 and 3.5.2). Even more important, do not try to update manually the system python versions. Let Ubuntu-MATE update manager update the python versions or any of the installed packages for you when it sees fit. These two installations and core to the Ubuntu-MATE system and should be left alone. Pyenv will help you even forget they are there.

Sometimes you may wish to install a python package that requires sudo to be executed. This will not work if the package is installed in the HOME python installations set up by pyenv. A good example is ps_mem, which is one of the most accurate memory usage reporting utilities out there (see, for instance:

In these type of cases, you can of course install pip so that you can install the package at a system level.

sudo apt-get install python-pip  # or sudo apt-get install python3-pip
sudo pip install ps_mem

But before you do that, always check Synaptic to make sure that package isn’t already available for you in the official repositories. If it is, use that instead and don’t use pip.

If you did have to install pip, do not then feel tempted to use this system pip to update any of of the existing packages in your system or elsewhere. You just used it to add another package to your system python installation and that’s it.

The above is also true if you wish to install certain packages that you want to become available to multiple users in your computer. But always keep a mental note of what you installed manually on the system. Those are the only packages you can updated manually.

Final warning:
If you do need to install pip as described above, it is because you need to install some package and make it available to all users on your system or be able to run it with sudo. But always check that package dependencies before installing. Go to and check those dependencies there. If by any chance it depends on any existing system packages, no not install it or ask here before installing. There’s a chance it will try to override the older dependency version currently installed in the system and that may break your Ubuntu-MATE. If you can’t figure out by yourself if that will be the case, ask here before installing.

Modern distros dependency on Python is unfortunate for python developers. But there are plenty of ways to circumvent it and create good user or development python environments that leave the system python alone.