在我的 Debian 10.3 XFCE 上删除软件后,apt 包管理器建议很多包我真正需要的可以删除,因为它们是“自动安装”的:
The following packages were automatically installed and are no longer required:
cups-pk-helper espeak-ng-data exfalso fonts-font-awesome fonts-lato
fonts-roboto-slab gir1.2-atspi-2.0 gir1.2-gst-plugins-base-1.0
gir1.2-gstreamer-1.0 gir1.2-gtksource-3.0 gir1.2-javascriptcoregtk-4.0
gir1.2-keybinder-3.0 gir1.2-notify-0.7 gir1.2-polkit-1.0 gir1.2-secret-1
gir1.2-soup-2.4 gir1.2-webkit2-4.0 gir1.2-wnck-3.0 javascript-common
libao-common libao4 libatk-adaptor libbrlapi0.6 libdotconf0 libespeak-ng1
libjs-jquery libjs-modernizr libjs-sphinxdoc libjs-underscore liblouis-data
liblouis17 libpcaudio0 libsonic0 libspeechd2 mlterm mlterm-common
mlterm-tools ncurses-term orca psf-unifont python3-brlapi python3-certifi
python3-cups python3-cupshelpers python3-feedparser python3-gst-1.0
python3-idna python3-louis python3-musicbrainzngs python3-mutagen
python3-pyatspi python3-pyinotify python3-requests python3-smbc
python3-speechd python3-urllib3 quodlibet sound-icons speech-dispatcher
speech-dispatcher-audio-plugins speech-dispatcher-espeak-ng
sphinx-rtd-theme-common system-config-printer system-config-printer-common
system-config-printer-udev ttf-unifont unifont x11-apps x11-session-utils
xbitmaps xbrlapi xfonts-unifont xinit
Use 'sudo apt autoremove' to remove them.
这确实是个坏消息,因为如果我想在将来使用命令(例如)删除软件包apt --purge autoremove
,我的系统可能会被破坏。所以我只记得已被删除xserver-xorg-video-nouveau
,并且在重新安装该软件包后,问题仍然存在。
真正的问题是 apt 已被删除的不仅仅是该软件包,只需重新安装它就可以解决依赖关系树。
答案中的解决方案。
答案1
以下评论来自AB关于 /var/log/apt,我发现cat /var/log/apt/history.log
.我重新安装了忘记的软件包,这就足够了。
Start-Date: 2020-05-06 01:50:43
Commandline: apt remove xserver-xorg-video-nouveau
Requested-By: jeanfar (1000)
Remove: xserver-xorg-video-nouveau:amd64 (1:1.0.16-1), task-desktop:amd64 (3.53), task-xfce-desktop:amd64 (3.53), xserver-xorg-video-all:amd64 (1:7.7+19)
End-Date: 2020-05-06 01:50:53
我想您想知道使用-
or*-
可以排除所有您并不真正想要的包。我的用例:sudo apt install -V --show-progress task-desktop task-xfce-desktop xserver-xorg-video-all libreoffice*- firefox-esr*- speech-dispatcher*- orca*-