删除 linux-headers-amd64 和 linux-image-amd64 软件包是否安全?

删除 linux-headers-amd64 和 linux-image-amd64 软件包是否安全?

我正在阅读从 Debian Stretch 到 Buster 的升级指南,第 4.8 节“过时的软件包”给出了aptitude purge '~o'删除它们的命令。[1]

但该命令要求删除linux-headers-amd64linux-image-amd64。这些包重要吗?如果我删除它们,所有东西都会损坏吗?

[1]https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#obsolete

完整输出:

# aptitude purge '~o'
The following packages will be REMOVED:
  alsa-base{p} aptdaemon{pu} aptdaemon-data{pu} cpp-4.6{pu} cpp-4.8{p} cpp-4.9{p} db5.1-util{p} default-java-plugin{p} denyhosts{p}
  firebird2.5-common{p} firebird2.5-common-doc{p} firebird2.5-server-common{p} firmware-linux-free{u} g++-4.9{p} gcc-4.6{p} gcc-4.6-base{p}
  gcc-4.8{p} gcc-4.8-base{p} gcc-4.9{p} gcc-4.9-base{p} gccxml{p} gcj-4.9-jre-lib{p} geoclue{p} geoclue-hostip{pu} geoclue-localnet{p}
  geoclue-manual{p} geoclue-nominatim{p} gir1.2-clutter-gst-2.0{p} gir1.2-vte-2.90{pu} gstreamer0.10-nice{p} gstreamer0.10-plugins-base{pu}
  gstreamer1.0-clutter{p} hardening-includes{p} icedtea-8-plugin{p} irqbalance{u} libamd2.2.0{p} libapt-inst1.5{p} libapt-pkg4.12{p}
  libarmadillo4{p} libasan0{p} libasan1{p} libavcodec-extra-56{p} libavresample2{p} libavutil54{p} libbind9-90{p} libboost-atomic1.55.0{p}
  libboost-chrono1.55.0{p} libboost-context1.55.0{p} libboost-filesystem1.55.0{p} libboost-graph1.55.0{p} libboost-iostreams1.49.0{p}
  libboost-iostreams1.55.0{p} libboost-locale1.55.0{p} libboost-math1.55.0{p} libboost-program-options1.55.0{p} libboost-python1.55.0{p}
  libboost-random1.55.0{p} libboost-regex1.55.0{p} libboost-serialization1.55.0{p} libboost-signals1.55.0{p} libboost-system1.55.0{p}
  libboost-test1.55.0{p} libboost-thread1.55.0{p} libboost-timer1.55.0{p} libcamel-1.2-49{p} libchromaprint0{p} libclutter-gst-2.0-0{p}
  libcolamd2.8.0{p} libdap11{p} libdapclient3{p} libdb5.1{p} libdns-export100{p} libdns100{p} libebackend-1.2-7{p} libecal-1.2-16{p}
  libedata-cal-1.2-23{p} libedataserver-1.2-18{p} libelfg0{p} libept1.4.12{p} libexiv2-13{p} libfbembed2.5{p} libffi5{p} libgcc-4.8-dev{p}
  libgcc-4.9-dev{p} libgcj15{p} libgconf2-4{u} libgcrypt11{p} libgdata19{p} libgeoclue0{pu} libgeos-3.4.2{p} libgif4{pu} libgit2-21{p}
  libglew1.10{p} libgnome-media-profiles-3.0-0{p} libgnutls26{p} libgphoto2-port10{p} libgrilo-0.2-1{p} libgstreamer-plugins-base0.10-0{pu}
  libgstreamer0.10-0{p} libgupnp-igd-1.0-4{u} libhdf5-8{p} libical1a{p} libicu52{p} libinput5{p} libirs-export91{p} libisc-export95{p} libisc95{p}
  libisccc90{p} libisccfg-export90{p} libisccfg90{p} libiscsi2{p} libisl10{p} libjasper1{pu} libjavascriptcoregtk-3.0-0{u} libjim0.75{p}
  libjpeg-progs{p} libjpeg8{pu} libjson-c2{p} libkml0{p} liblept4{p} libllvm3.5{p} liblognorm1{p} liblwres90{p} libmediaart-1.0-0{p} libmpc2{p}
  libmusicbrainz3-6{p} libmusicbrainz5-1{p} libmysqlclient-dev{p} libmysqlclient18{p} libnetcdfc7{p} libnice10{u} libonig2{p} libopenjpeg5{p}
  libopenraw1{p} liborcus-0.8-0{p} libpango1.0-0{u} libplist2{p} libpng12-0{pu} libpoppler46{p} libprocps0{p} libprocps3{p} libprotobuf9{p}
  libpsl0{p} libqmi-glib1{p} libqpdf13{p} libqqwing2{p} libraw10{p} libreadline6{p} libreoffice-sdbc-firebird{p} librhythmbox-core8{p}
  libruby2.1{p} librygel-core-2.4-2{p} librygel-renderer-2.4-2{p} librygel-renderer-gst-2.4-2{p} librygel-server-2.4-2{p}
  libschroedinger-1.0-0{pu} libspice-client-gtk-3.0-4{p} libssl1.0.0{p} libstdc++-4.9-dev{p} libstreams0{p} libswscale3{p} libsystemd-daemon0{p}
  libtasn1-3{p} libtidy-0.99-0{p} libtxc-dxtn-s2tc0{p} libudev0{p} libumfpack5.4.0{p} libusbmuxd2{p} libval14{p} libvpx1{p} libvte-2.90-9{p}
  libvte-2.90-common{pu} libwebkitgtk-3.0-0{u} libwebp5{p} libwebpdemux1{p} libwebpmux1{p} libwebrtc-audio-processing-0{p} libwiretap4{p}
  libwps-0.3-3{p} libwsutil4{p} libx264-142{p} libxapian22{p} libxtables10{p} linux-compiler-gcc-4.6-x86{p} linux-compiler-gcc-4.8-x86{p}
  linux-compiler-gcc-6-x86{u} linux-headers-3.16.0-0.bpo.4-amd64{p} linux-headers-3.16.0-0.bpo.4-common{p} linux-headers-3.16.0-4-amd64{p}
  linux-headers-3.16.0-4-common{p} linux-headers-4.9.0-4-amd64{p} linux-headers-4.9.0-4-common{p} linux-image-3.16.0-4-amd64{p}
  linux-image-4.9.0-4-amd64{p} linux-kbuild-3.16{p} lsb-security{p} mountall{p} php-xml-parser{p} php5{p} php5-apcu{p} php5-cli{p} php5-common{p}
  php5-curl{p} php5-fpm{p} php5-gd{p} php5-intl{p} php5-json{p} php5-mcrypt{p} php5-mysql{p} php5-pgsql{p} php5-readline{p} php5-sqlite{p}
  postgresql-9.4-postgis-scripts{p} postgresql-client-9.4{p} python-debianbts{u} python-httplib2{u} python-pycurl{u} python-pysimplesoap{u}
  python-reportbug{p} python-support{p} python3-aptdaemon{p} python3-aptdaemon.gtk3widgets{p} ruby2.1{p} ruby2.1-dev{p} sysvinit{p}
0 packages upgraded, 0 newly installed, 225 to remove and 29 not upgraded.
Need to get 0 B of archives. After unpacking 984 MB will be freed.
The following packages have unmet dependencies:
 linux-image-amd64 : Depends: linux-image-4.9.0-4-amd64 but it is not going to be installed
 linux-headers-amd64 : Depends: linux-headers-4.9.0-4-amd64 but it is not going to be installed
The following actions will resolve these dependencies:

     Remove the following packages:
1)     linux-headers-amd64 [4.9+80+deb9u2 (now)]
2)     linux-image-amd64 [4.9+80+deb9u2 (now)]

     Install the following packages:
3)     libjpeg-turbo-progs [1:1.5.1-2 (oldstable)]
4)     libturbojpeg0 [1:1.5.1-2 (oldstable)]
5)     libtxc-dxtn-s2tc [1.0+git20151227-2 (oldstable)]

     Leave the following dependencies unresolved:
6)     dkms recommends linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers
7)     default-jre recommends default-java-plugin



Accept this solution? [Y/n/q/?] ^C

# uname -a
Linux PC 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux
# cat /etc/debian_version 
9.12

答案1

严格来说,这些包不是必需的,然而至少image在升级过程中强烈推荐使用该软件包,以确保您的内核得到升级。

我怀疑它们被包含在内以便删除,因为您的系统尚未完全更新。按照中的说明进行操作第 4.4 节再次,特别注意内核:您应该有一个4.9.0-12名称中带有而不是 的软件包4.9.0-4,并且在重新启动后,uname -a应该显示 version 4.9.210。然后aptitude将停止尝试删除该linux-image-amd64包。

相关内容