0

Is there's a way to recover these packages that I mistakenly removed ? I used this line of code without thinking and afterwards it messed up my system.

$ sudo apt-get install -f -y

Removing teamviewer:i386 (12.0.85001) ... 
Removingactivity-log-manager (0.9.7-0ubuntu23.16.04.1) ... 
Removing ubuntu-software (3.20.5-0ubuntu0.16.04.5) ... 
Removing gnome-software (3.20.5-0ubuntu0.16.04.5) ... 
Removing appstream (0.9.4-1ubuntu3) ...
Removing ubuntu-desktop (1.361) ... 
Removing unity (7.4.0+16.04.20160906-0ubuntu1) ... 
Removing bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ... 
Removing brltty (5.3.1-2ubuntu2.1) ... 
Removing clamav (0.99.2+dfsg-0ubuntu0.16.04.2) ... 
Removing clamav-freshclam (0.99.2+dfsg-0ubuntu0.16.04.2) ...
Removing compiz (1:0.9.12.2+16.04.20160823-0ubuntu1) ... 
Removing compiz-gnome (1:0.9.12.2+16.04.20160823-0ubuntu1) ... 
Removing cups-browsed (1.8.3-2ubuntu3.1) ... 
Removing cups-bsd (2.1.3-4ubuntu0.3) ... 
Removing deja-dup (34.2-0ubuntu1.1) ...
Removing dosemu (1.4.0+svn.2010-1) ... 
Removing eog (3.18.2-1ubuntu2.1) ...
Removing evince (3.18.2-1ubuntu4.1) ...
Removing file-roller (3.16.5-0ubuntu1.2) ... 
Removing firefox (55.0.2+build1-0ubuntu0.16.04.1) ... 
Removing fwupd (0.7.0-0ubuntu4.3) ... 
Removing gdb (7.11.1-0ubuntu1~16.5) ... 
Removing gdbserver (7.11.1-0ubuntu1~16.5) ...
Removing ghostscript-x (9.18~dfsg~0-0ubuntu2.7) ... 
Removing gnome-calendar (3.20.4-0ubuntu0.1) ... 
Removing gnome-font-viewer (3.16.2-1ubuntu1) ...
Removing gstreamer1.0-alsa:amd64 (1.8.3-1ubuntu0.2) ... 
Removing gstreamer1.0-libav:amd64 (1.8.3-1ubuntu0.2) ... 
Removing gstreamer1.0-plugins-base-apps (1.8.3-1ubuntu0.2) ...
Removing gstreamer1.0-tools (1.8.3-1~ubuntu0.1) ... 
Removing ubuntu-artwork (1:14.04+16.04.20161024-0ubuntu1) ... 
Removing light-themes (14.04+16.04.20161024-0ubuntu1) ... 
Removing gtk2-engines-murrine:amd64 (0.98.2-0ubuntu2.2) ... 
Removing gvfs-bin (1.28.2-1ubuntu1~16.04.2) ... 
Removing gvfs-fuse (1.28.2-1ubuntu1~16.04.2) ... 
Removing va-driver-all:amd64 (1.7.0-1) ... 
Removing i965-va-driver:amd64 (1.7.0-1) ... 
Removing inputattach (1:1.4.9-1) ... 
Removing libaacs0:amd64 (0.8.1-1) ... 
Removing libappstream3:amd64 (0.9.4-1ubuntu3) ... 
Removing libavfilter-ffmpeg5:amd64 (7:2.8.11-0ubuntu0.16.04.1) ... 
Removing libass5:amd64 (0.13.1-1) ... 
Removing libavresample-ffmpeg2:amd64 (7:2.8.11-0ubuntu0.16.04.1) ... 
Removing libbabeltrace-ctf1:amd64 (1.3.2-1) ... 
Removing libbdplus0:amd64 (0.1.2-1) ... 
Removing libbs2b0:amd64 (3.1.0+dfsg-2.2) ... 
Removing libc6-dbg:amd64 (2.23-0ubuntu9) ... 
Removing whoopsie (0.2.52.5) ... 
Removing libcurl3:amd64 (7.47.0-1ubuntu2.2) ... 
Removing libdfu1:amd64 (0.7.0-0ubuntu4.3) ... 
Removing libevview3-3:amd64 (3.18.2-1ubuntu4.1) ... 
Removing libevdocument3-4:amd64 (3.18.2-1ubuntu4.1) ... 
Removing libevent-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ... 
Removing libflite1:amd64 (2.0.0-release-1) ... 
Removing xserver-xorg-video-all-hwe-16.04 (1:7.7+16ubuntu3~16.04.1) ...
Removing xserver-xorg-video-vmware-hwe-16.04 (1:13.2.1-1build1~16.04.1) ... 
Removing libxatracker2:amd64 (17.0.7-0ubuntu0.16.04.1) ... 
Removing libllvm3.8:amd64 (1:3.8-2ubuntu4) ...
Removing libmagickcore-6.q16-2-extra:amd64 (8:6.8.9.9-7ubuntu5.9) ...
Removing vino (3.8.1-0ubuntu9.2) ...
Removing libminiupnpc10:amd64 (1.9.20140610-2ubuntu2.16.04.1) ...
Removing libnatpmp1:amd64 (20110808-4) ... 
Removing libopencv-imgproc2.4v5:amd64 (2.4.9.1+dfsg-1.5ubuntu1) ... 
Removing qml-module-ubuntu-web:amd64 (0.23+16.04.20161028-0ubuntu2) ...
Removing unity-webapps-qml (0.1+16.04.20160114-0ubuntu1) ... 
Removing liboxideqt-qmlplugin:amd64 (1.21.5-0ubuntu0.16.04.1) ... 
Removing liboxideqtquick0:amd64 (1.21.5-0ubuntu0.16.04.1) ... 
Removing liboxideqtcore0:amd64 (1.21.5-0ubuntu0.16.04.1) ... 
Removing libpoppler-glib8:amd64 (0.41.0-0ubuntu1.2) ... Removing

can anyone suggest how to restore my old packages ?

  • Possible command to retrieve all the packages that were removed and reinstall them: askubuntu.com/a/50624/231142 – Terrance Dec 4 '17 at 17:45
  • 1
    If somebody instructed you to use -f and -y together without a warning, they are not your friend. If you discovered instructions for -f and -y together in an Ubuntu support forum, please flag that thread for moderator attention. New users should not head down that path for obvious reasons. – user535733 Dec 4 '17 at 19:20
2

Yes!

sudo apt update
sudo apt install ubuntu-desktop^

This installs the task (note the caret (^) on the end - this is important). This will re-install everything that was expected to be there when you first installed.

This won't put back random other things that were removed like teamviewer, but will at least get you back to a working state. Note that if you were using Kubuntu, you'd use apt install kubuntu-desktop^ - so change that as appropriate.

| improve this answer | |
2

-y is a dangerous tool. I'd recommend extreme caution when using it for exactly this reason.

A lot of the packages listed here are covered under ubuntu-desktop meta-package. Re-install that first and foremost:

sudo apt install --install-recommends --reinstall ubuntu-desktop
sudo apt -f install

Following this, you should re-install your HWE system:

sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04 

Next, you will have to re-install all of the remaining packages (like dosemu) manually, I'm afraid. You can just chain them all onto a single apt install command for the most part.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.