0

I did

sudo apt-get remove python

and it told me that about 150 MB would be freed by this operation. Then, after that I did

sudo apt-get install python

and it told me that 687 kB of additional disk space would be used. How does this add up?

Side question: Did I break anything by doing the above? If yes, how do I fix it? Edit: Answered here

AplusKminus
  • 111
  • 7
  • Just a question. Why did you do `sudo apt-get remove` in the first place ? – Sergiy Kolodyazhnyy Mar 02 '16 at 15:59
  • you probably removed things that required python to work... – Mateo Mar 02 '16 at 15:59
  • @Serg I thought: Who needs python2.7? After I hit `Enter` I realized that maybe some Ubuntu functionality actually needs it. I know it was stupid, but its done now... – AplusKminus Mar 02 '16 at 16:04
  • 1
    maybe: `sudo apt-get install ubuntu-desktop` might help get back some essentials? – Mateo Mar 02 '16 at 16:07
  • 2
    Possible duplicate of [I accidentaly did sudo apt-get remove python](http://askubuntu.com/questions/437644/i-accidentaly-did-sudo-apt-get-remove-python) – Mateo Mar 02 '16 at 16:11
  • @Mateo yes, my side question was in fact a duplicate of the question you mentioned, but my main question was not. – AplusKminus Mar 02 '16 at 16:15

1 Answers1

4

The command

sudo apt-get remove python

removed the package python and any package that depends on it. That's a lot of packages, and it most likely broke parts of your system.

The command

sudo apt-get install python

just installs the package python but not all the other packages that got removed.

You can see the list of all removed packages in the file /var/log/apt/history.log.

With the command

sudo apt-get install --reinstall ubuntu-desktop

you can install all packages belonging to the default installation. Replace ubuntu-desktop with kubuntu-desktop, xubuntu-desktop or whatever flavour you are using.

Florian Diesch
  • 86,013
  • 17
  • 224
  • 214