我的自動刪除功能是否破壞了我的系統?

我的自動刪除功能是否破壞了我的系統?

我最近安裝了錯誤版本的 PlayOnLinux,不得不將其卸載。我透過終端這樣做了sudo apt-get autoremove playonlinux。但好像我已經卸載了重要的東西!抱歉,這是葡萄牙語。

Lendo listas de pacotes... Pronto
Construindo árvore de dependências       
Lendo informação de estado... Pronto
Os pacotes a seguir serão REMOVIDOS:
  icoutils imagemagick-6-common jq libatk-bridge2.0-0:i386 libatk1.0-0:i386
  libatspi2.0-0:i386 libcolord2:i386 libepoxy0:i386 libgtk-3-0:i386 libjq1
  libjson-glib-1.0-0:i386 liblqr-1-0 libmagickcore-6.q16-6
  libmagickcore-6.q16-6-extra libmagickwand-6.q16-6 libonig5 libpython2-stdlib
  libpython2.7-minimal libpython2.7-stdlib librest-0.7-0:i386
  libsoup-gnome2.4-1:i386 linux-headers-5.4.0-91
  linux-headers-5.4.0-91-generic linux-image-5.4.0-91-generic
  linux-modules-5.4.0-91-generic linux-modules-extra-5.4.0-91-generic
  python-wxgtk3.0 python-wxversion python2 python2-minimal python2.7
  python2.7-minimal virtualbox virtualbox-qt wine-stable wine-stable-amd64
  wine-stable-i386:i386 wine-staging wine-staging-amd64 wine-staging-i386:i386
0 pacotes atualizados, 0 pacotes novos instalados, 40 a serem removidos e 0 não atualizados.
Depois desta operação, 3.058 MB de espaço em disco serão liberados.
Você quer continuar? [S/n] s
(Lendo banco de dados ... 496141 ficheiros e directórios actualmente instalados.)
A remover icoutils (0.32.3-3) ...
A remover libmagickcore-6.q16-6-extra:amd64 (8:6.9.10.23+dfsg-2.1ubuntu11.4) ...
A remover libmagickwand-6.q16-6:amd64 (8:6.9.10.23+dfsg-2.1ubuntu11.4) ...
A remover libmagickcore-6.q16-6:amd64 (8:6.9.10.23+dfsg-2.1ubuntu11.4) ...
A remover imagemagick-6-common (8:6.9.10.23+dfsg-2.1ubuntu11.4) ...
A remover jq (1.6-1ubuntu0.20.04.1) ...
A remover libgtk-3-0:i386 (3.24.20-0ubuntu1) ...
A remover libatk-bridge2.0-0:i386 (2.34.2-0ubuntu2~20.04.1) ...
A remover libatk1.0-0:i386 (2.35.1-1ubuntu2) ...
A remover libatspi2.0-0:i386 (2.36.0-2) ...
A remover libcolord2:i386 (1.4.4-2) ...
A remover libepoxy0:i386 (1.5.4-1) ...
A remover libjq1:amd64 (1.6-1ubuntu0.20.04.1) ...
A remover libjson-glib-1.0-0:i386 (1.4.4-2ubuntu2) ...
A remover liblqr-1-0:amd64 (0.4.2-2.1) ...
A remover libonig5:amd64 (6.9.4-1) ...
A remover python-wxgtk3.0 (3.0.2.0+dfsg-8build1) ...
A remover python-wxversion (3.0.2.0+dfsg-8build1) ...
A remover python2 (2.7.17-2ubuntu4) ...
A remover libpython2-stdlib:amd64 (2.7.17-2ubuntu4) ...
A remover python2.7 (2.7.18-1~20.04.1) ...
A remover libpython2.7-stdlib:amd64 (2.7.18-1~20.04.1) ...
A remover python2-minimal (2.7.17-2ubuntu4) ...
A remover python2.7-minimal (2.7.18-1~20.04.1) ...
Unlinking and removing bytecode for runtime python2.7
A remover libpython2.7-minimal:amd64 (2.7.18-1~20.04.1) ...
A remover librest-0.7-0:i386 (0.8.1-1) ...
A remover libsoup-gnome2.4-1:i386 (2.70.0-1) ...
A remover linux-headers-5.4.0-91-generic (5.4.0-91.102) ...
A remover linux-headers-5.4.0-91 (5.4.0-91.102) ...
A remover linux-modules-extra-5.4.0-91-generic (5.4.0-91.102) ...
A remover linux-image-5.4.0-91-generic (5.4.0-91.102) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.4.0-91-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Imagem Linux encontrada: /boot/vmlinuz-5.4.0-94-generic
Imagem initrd encontrada: /boot/initrd.img-5.4.0-94-generic
Imagem Linux encontrada: /boot/vmlinuz-5.4.0-92-generic
Imagem initrd encontrada: /boot/initrd.img-5.4.0-92-generic
Imagem Linux encontrada: /boot/vmlinuz-5.4.0-74-generic
Imagem initrd encontrada: /boot/initrd.img-5.4.0-74-generic
concluído
A remover linux-modules-5.4.0-91-generic (5.4.0-91.102) ...
A remover virtualbox-qt (6.1.26-dfsg-3~ubuntu1.20.04.2) ...
A remover virtualbox (6.1.26-dfsg-3~ubuntu1.20.04.2) ...
A remover wine-stable (6.0.2~focal-1) ...
A remover wine-stable-amd64 (6.0.2~focal-1) ...
A remover wine-stable-i386:i386 (6.0.2~focal-1) ...
A remover wine-staging (7.0~rc5~focal-1) ...
A remover wine-staging-amd64 (7.0~rc5~focal-1) ...
A remover wine-staging-i386:i386 (7.0~rc5~focal-1) ...
A processar 'triggers' para mime-support (3.64ubuntu1) ...
A processar 'triggers' para hicolor-icon-theme (0.17-2) ...
A processar 'triggers' para libc-bin (2.31-0ubuntu9.2) ...
A processar 'triggers' para man-db (2.9.1-1) ...
A processar 'triggers' para shared-mime-info (1.15-1) ...
A processar 'triggers' para desktop-file-utils (0.24+linuxmint1) ...

提到了很多核心、grub 和引導相關的東西。系統仍然可以正常運行,但上次我遇到啟動和 grub 問題時,我只是在重新啟動時才發現,並且作業系統無法加載。

IF起來了嗎?

答案1

自動刪除用於擺脫舊的和/或不再需要的依賴項。這linux-模組-linux-標頭-您看到的刪除的內容可能來自已更新的先前核心。如果您執行此操作,uname -r您應該會看到一個版本號,該版本號大於您刪除的版本號。

答案2

sudo apt-get autoremove不接受任何參數。所以這兩行是等價的(<package>參數被忽略):

sudo apt-get autoremove
sudo apt-get autoremove <package>

安裝套件的幾點:

  • sudo apt-get install <package>安裝<package>和所有相依性。 <package>被標記為“手動安裝”。
  • sudo apt-get purge <package>清除<package>但保留其依賴項
  • sudo apt-get autoremove清除任何不依賴「手動安裝」的軟體包。
  • apt-mark showmanual將向您顯示手動安裝的軟體包清單。
  • apt-mark manual <package>將把一個包設定為“手動安裝”,這樣它就不會被自動刪除。

我添加了相關信息,apt-mark以便您知道發生了什麼。基本上沒有必要使用它。autoremove非常安全,因為它永遠不會卸載您明確安裝的東西。

相關內容