错误删除的软件包

错误删除的软件包

有没有办法恢复我错误删除的这些包?我不假思索地使用了这行代码,结果弄乱了我的系统。

$ 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

有人可以建议如何恢复我的旧包裹吗?

答案1

是的!

sudo apt update
sudo apt install ubuntu-desktop^

这将安装任务(请注意末尾的插入符号 (^) - 这很重要)。这将重新安装您首次安装时预期存在的所有内容。

这不会恢复被删除的其他随机内容(如 teamviewer),但至少可以让您恢复工作状态。请注意,如果您使用的是 Kubuntu,则可以使用apt install kubuntu-desktop^- 因此请根据需要进行更改。

答案2

-y是一种危险的工具。正因为如此,我建议在使用它时要格外小心。

这里列出的许多软件包都包含在ubuntu-desktopmeta-package 中。首先重新安装它:

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

接下来您应该重新安装您的 HWE 系统:

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

dosemu接下来,恐怕您必须手动重新安装所有剩余的软件包(如)。apt install大多数情况下,您可以将它们全部链接到单个命令中。

相关内容