apt-get autoremove after apt upgrade wiped the Proxmox

Jan 17, 2018
4
0
1
54
In brief:
  • Early 2017: Installed PVE ontop a Debian 8.x according to https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Jessie
  • Late 2017: Upgraded Debian to version 9 Stretch
  • Early 2018: Ran update for Meltdown/Spectre in week 2
    • week 3: /boot reportedly nearly out of free space
      • Ran apt-get autoremove as I've done with no hassle for years, so I was too careless for a moment there and didn't study the details in the removal listing and:
      • Boom: most of Proxmox was removed!!
    • Managed to re-install Proxmox and problem solved... pheeeewww
No excuse on my part - I should have paid closer attention, no doubt about that! but this shouldn't be a problem in the first place - is there some step, I might have missed?
Suggestions?
 
I do not know which step you missed on the upgrade but reading the apt removal information is always recommended :).

And please always run:

> apt dist-upgrade (instead of apt upgrade)
 
I was being too brief, perhaps :)

Obviously, when upgrading from Jessie to Stretch last december, I ran:
> apt update
> apt upgrade
> apt dist-upgrade

which was all good. Last week I ran
> apt update
> apt upgrade
and a subsequent reboot - all good.

It was only after yesterday's
> apt-get autoremove
that I got the problem.

I have never encountered this before after a autoremove and I've been using Debian for quite a number of years.
So: where to look for the reason? Why were all the Proxmox components marked for removal?
 
Never run "apt upgrade".

In order to make sure that packages are not removed by autoremove, make sure that proxmox-ve package is installed:

> apt install proxmox-ve

(I do not see reason why your host remove the packages.)
 
I was also seeing this on a server, I'm fairly sure I "always" run dist-upgrade...

It turned out I still had the linux-image-amd64 package installed. In the install docs removing that is an optional step... but maybe it needs a bit more emphasis.

Here's the output of a dist upgrade with extra debug output: `apt-get dist-upgrade -u -o Debug::pkgProblemResolver=1`
Code:
Reading package lists... Done
Building dependency tree    
Reading state information... Done
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) pve-firmware:amd64 < 2.0-3 @ii mK Ib >
Broken pve-firmware:amd64 Conflicts on firmware-linux-free:amd64 < none -> 3.4 @un uN >
  Considering firmware-linux-free:amd64 1 as a solution to pve-firmware:amd64 1
  Removing pve-firmware:amd64 rather than change firmware-linux-free:amd64
Investigating (0) proxmox-ve:amd64 < 5.1-41 @ii mK Ib >
Broken proxmox-ve:amd64 Depends on pve-firmware:amd64 < 2.0-3 @ii mR >
  Considering pve-firmware:amd64 1 as a solution to proxmox-ve:amd64 0
  Removing proxmox-ve:amd64 rather than change pve-firmware:amd64
Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  apparmor attr bridge-utils ceph-common corosync criu cstream dtach faketime fontconfig fontconfig-config fonts-dejavu-core fonts-font-awesome gdisk glusterfs-client glusterfs-common ifenslave ipset libacl1-dev libanyevent-http-perl libanyevent-perl libapparmor-perl
  libappconfig-perl libasound2 libasound2-data libasync-interrupt-perl libasyncns0 libattr1-dev libauthen-pam-perl libbabeltrace-ctf1 libbabeltrace1 libboost-iostreams1.62.0 libboost-program-options1.62.0 libboost-random1.62.0 libboost-regex1.62.0 libboost-system1.62.0
  libboost-thread1.62.0 libc-dev-bin libc6-dev libcaca0 libcairo2 libcephfs1 libcfg6 libclone-perl libcmap4 libcorosync-common4 libcpg4 libcrypt-openssl-bignum-perl libcrypt-openssl-random-perl libcrypt-openssl-rsa-perl libdatrie1 libdevel-cycle-perl libdw1 libev-perl libfaketime
  libfcgi-bin libfcgi0ldbl libfile-chdir-perl libfile-readbackwards-perl libfile-sync-perl libfilesys-df-perl libflac8 libfontconfig1 libgnutlsxx28 libgraphite2-3 libguard-perl libharfbuzz0b libibverbs1 libice6 libio-multiplex-perl libio-stringy-perl libipset3 libiscsi7
  libjemalloc1 libjpeg62-turbo libjs-extjs liblinux-inotify2-perl liblockfile-simple-perl liblog-agent-perl libmime-base32-perl libnet-dbus-perl libnet-dns-perl libnet1 libnetfilter-log1 libnl-3-200 libnl-route-3-200 libnspr4 libnss3 libogg0 libpango-1.0-0 libpangocairo-1.0-0
  libpangoft2-1.0-0 libpixman-1-0 libprotobuf-c1 libprotobuf10 libpulse0 libpve-access-control libpve-common-perl libpve-guest-common-perl libpve-http-server-perl libpve-storage-perl libqb0 libquorum5 librados2 librados2-perl libradosstriper1 librbd1 librdmacm1 librgw2 librrd8
  librrds-perl libsdl1.2debian libsm6 libsnappy1v5 libsndfile1 libstatgrab10 libstring-shellquote-perl libtemplate-perl libthai-data libthai0 libtie-ixhash-perl libtotem-pg5 liburcu4 libusbredirparser1 libuuid-perl libvorbis0a libvorbisenc2 libvotequorum8 libx11-xcb1
  libxcb-render0 libxcb-shm0 libxi6 libxml-twig-perl libxml-xpathengine-perl libxrender1 libxslt1.1 libxtst6 linux-libc-dev lxc-pve lxcfs lzop manpages-dev novnc-pve numactl proxmox-widget-toolkit pve-cluster pve-container pve-docs pve-firewall pve-ha-manager pve-i18n
  pve-libspice-server1 pve-manager pve-qemu-kvm pve-xtermjs python-cephfs python-cffi-backend python-chardet python-cryptography python-enum34 python-idna python-ipaddr python-ipaddress python-openssl python-pkg-resources python-protobuf python-pyasn1 python-rados python-rbd
  python-requests python-setuptools python-six python-urllib3 qemu-server rrdcached socat spiceterm sqlite3 uidmap vncterm xsltproc
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  proxmox-ve pve-firmware
The following NEW packages will be installed:
  firmware-linux-free linux-image-4.9.0-6-amd64
The following packages will be upgraded:
  libpve-common-perl linux-image-amd64 proxmox-widget-toolkit pve-container pve-manager pve-qemu-kvm qemu-server
7 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
Need to get 0 B/47.6 MB of archives.
After this operation, 56.5 MB of additional disk space will be used.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!