如何检查软件包是否是基本操作系统安装的必需品/一部分?

lam*_*ter 3 updates package-management

如何检查软件包是否是基本 Ubuntu (v18.04.5) 安装必不可少的一部分?

例如。我一直在我的每周软件更新程序 GUI 中看到CephRADOS更新,即...

?  ~ apt list --upgradable
Listing... Done
libcephfs2/bionic-updates 12.2.13-0ubuntu0.18.04.8 amd64 [upgradable from: 12.2.13-0ubuntu0.18.04.7]
librados2/bionic-updates 12.2.13-0ubuntu0.18.04.8 amd64 [upgradable from: 12.2.13-0ubuntu0.18.04.7]
ubuntu-drivers-common/bionic-updates 1:0.8.6.3~0.18.04.1 amd64 [upgradable from: 1:0.5.2.5]
Run Code Online (Sandbox Code Playgroud)

我不记得我是否在一段时间前自己安装了这些作为实验,或者它们是否是基本/基本 Ubuntu 安装的一部分。如果它们不是基本安装或必不可少的“普通”Ubuntu 系统的一部分,那么我想删除这些软件包。有什么方法可以告诉(特别是如何判断删除还会影响什么)?

use*_*733 13

是的,很容易:模拟移除,看看会发生什么。

  • 示例:(apt remove libcephfs2 --simulate
    不需要,sudo因为您真的不想要任何更改)

仔细阅读输出:如果删除列表很长,和/或包含关键包,如gnome-shellgdmubuntu-desktopubuntu-standard,或您使用的应用程序,那么您知道删除它可能比方便的更麻烦。


这是ubuntu-drivers-common在测试系统上模拟删除的编辑示例。

  • 注意缺少sudo和突出的--simulate标志。安全!
  • 请注意,受影响的软件包之一是ubuntu-desktop. 这意味着ubuntu-drivers-common是原始基本安装的一部分。
$ apt remove ubuntu-drivers-common --simulate
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
[...edit...]
The following packages were automatically installed and are no longer required:
  apturl-common gir1.2-goa-1.0 gir1.2-snapd-1 python3-click python3-colorama
  python3-dateutil python3-debconf python3-software-properties python3-xkit
  software-properties-common unattended-upgrades update-notifier-common
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  apturl nautilus-share software-properties-gtk ubuntu-desktop
  ubuntu-desktop-minimal ubuntu-drivers-common ubuntu-release-upgrader-gtk
  update-manager update-notifier
0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded.
[...edit...]
Run Code Online (Sandbox Code Playgroud)

  • @VHS 请参阅 `apt-get` 联机帮助页以了解区别:`-s、--simulate、--just-print、--dry-run、--recon、--no-act` 都是同义词。他们做的事情完全一样。为清楚起见,在此答案中统一使用了“--simulate”。 (2认同)