0

I have an ubuntu server (16.04) that I am supposed to deploy a python-flask website to. However I was having some difficulty with the virtual environment, and read here to remove packages manually in the dist-packages folder which was not in my virtual environment.

This resulted in me removing pip and not being able to use it in my virtual environment as well.

So then I read here that I should run the command;

sudo apt-get install ubuntu-desktop^

So I did and its still running 10 minuted later. But am now getting confused, as I have an ubuntu server not ubuntu-desktop, will this restore the appropriate files correctly? If not, should I cancel this command I run, as it is still running now.

Update:

This is my activity log file for today's events. I am not sure what else to remove I have already run apt remove ubuntu-desktop;

Start-Date: 2017-03-28  06:07:33
Commandline: /usr/bin/unattended-upgrade
Install: linux-headers-4.4.0-70-generic:amd64 (4.4.0-70.91, automatic), linux-cloud-tools-4.4.0-70:amd64 (4.4.0-70.91, automatic), linux-cloud-tools-4.4.0-70-generic:amd64 (4.4.0-70.91, automatic), linux-headers-4.4.0-70:amd64 (4.4.0-70.91, automatic), linux-image-4.4.0-70-generic:amd64 (4.4.0-70.91, automatic), linux-image-extra-4.4.0-70-generic:amd64 (4.4.0-70.91, automatic)
Upgrade: linux-headers-generic:amd64 (4.4.0.66.70, 4.4.0.70.76), linux-libc-dev:amd64 (4.4.0-67.88, 4.4.0-70.91), linux-image-generic:amd64 (4.4.0.66.70, 4.4.0.70.76), linux-cloud-tools-common:amd64 (4.4.0-67.88, 4.4.0-70.91), linux-virtual:amd64 (4.4.0.66.70, 4.4.0.70.76), eject:amd64 (2.1.5+deb1+cvs20081104-13.1, 2.1.5+deb1+cvs20081104-13.1ubuntu0.16.04.1), linux-headers-virtual:amd64 (4.4.0.66.70, 4.4.0.70.76), linux-cloud-tools-virtual:amd64 (4.4.0.67.72, 4.4.0.70.76), linux-image-extra-virtual:amd64 (4.4.0.66.70, 4.4.0.70.76), linux-image-virtual:amd64 (4.4.0.66.70, 4.4.0.70.76)
End-Date: 2017-03-28  06:15:21

Start-Date: 2017-03-28  06:15:37
Commandline: /usr/bin/unattended-upgrade
Remove: linux-cloud-tools-4.4.0-67-generic:amd64 (4.4.0-67.88), linux-cloud-tools-4.4.0-67:amd64 (4.4.0-67.88)
End-Date: 2017-03-28  06:15:44

Start-Date: 2017-03-28  10:40:36
Commandline: apt-get install ubuntu-desktop^
Requested-By: Fonzi (1000)
mp252
  • 151

1 Answers1

0

Manually removing files from places other than your home folder if you are unsure of what you are affecting is not a good starting sign....

First question would be, do you even remember what you removed in the first place ?

Secondly, apt-get install ubuntu-desktop^ indeed should not have been run in the first place... hint was in the name...

Thirdly, "fixing" with removing it will have yielded odd results, not least because you also have removed files manually; but also because when removing with a package manager, it will also try to check for "unused" files... when things are not in the right places, the checks can yield false positives, false negatives; if some files were installed before ubuntu-desktop was installed, but are normally part of ubuntu-desktop, uninstalling ubuntu-desktop might remove those too.

You might again remove way more than you installed. apt install X ; apt remove X is NOT guaranteed to be idempotent.

...

I could go on, but suffice to say that this server is probably not in an operational state, or at least, it won't be for long - routes to resolution:

  • Who provided this server to you? If it was a client, employer, etc ask them. Don't flail alone, you'll only do more damage
  • If the server is a VM or a container itself, can you revert to a snapshot ? Reverting early is preferable to leaving a server in a sorry state, accumulating more operational information... because that's just more data that will be lost on revert
  • Was the server brand new? If so, just ditch the server and start a fresh one.

If there was already important data on the server, find the admin (if not you). They will need to take their backup ASAP and start a fresh server to restore to. Given what you have described above, I would say the server is fubar now.

tk-noodle
  • 798