如何檢查某個軟體包是否為基本作業系統安裝的必要/一部分?

如何檢查某個軟體包是否為基本作業系統安裝的必要/一部分?

如何檢查某個軟體包是否是基本 Ubuntu (v18.04.5) 安裝的必要/一部分?

例如。我不斷看到頭孢拉多斯我的每週軟體更新程式 GUI 中的更新,即...

➜  ~ 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]

我不記得我自己安裝這些是前一段時間的實驗,還是它們是基本/基本 Ubuntu 安裝的一部分。如果它們不是基本安裝或基本「正常」Ubuntu 系統的一部分,那麼我想刪除這些軟體包。有什麼方法可以告訴(特別是如何知道刪除還會影響哪些內容)?

答案1

是的,很容易:模擬移除並看看會發生什麼。

  • 例如:(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...]

相關內容