apt-get dist-upgrade interrupted

matthew

Renowned Member
Jul 28, 2011
210
5
83
On proxmox 4.x I did a "apt-get update" followed by a "apt-get dist-upgrade".

My wifi router I was connected to the internet with rebooted when "apt-get dist-upgrade" was almost complete. The proxmox 4.4.x server never lost power or rebooted or even lost Internet access. It was just the Putty terminal I was accessing it with lost connection to it in the towards end of the update.

How can I tell if the update completed correctly and its safe to reboot?

Looking at: "/var/log/dpkg.log" and comparing it to another identical server I updated and rebooted an hour earlier I see absolutely no differences.
 
Hi Matthew,

That's an excellent question!, and I made note of these commands for myself just in case.

First before doing anything, make a full backup of your VM's and also the data inside them (just in case) ;)

For interrupted updates. I run the command:

#apt-get clean

this clears out the local repository, and then I run:

#sudo dpkg --configure -a

this reinstalls the last package that was interrupted

and then I run

#sudo apt-get install -f

to fix any broken dependencies

And then you can optionally run this last:

#apt update && apt dist-upgrade

to install any newer packages since last update

Hope this helps! :)
 
Last edited:
  • Like
Reactions: matthew
Hello,

It shouldn't update to 5.x, as long as your repository lists are pointing to "debian Jessie".
If you change repository to "debian stretch", it will update to 5.1 however.

https://pve.proxmox.com/wiki/Package_Repositories
To check, existing repository type:

#cat /etc/apt/sources.list
and
#cat /etc/apt/sources.list.d/pve-enterprise.list

And it should list "debian Jessie" in both lists for the 4.x series
 
it's always a good idea to run stuff like upgrades inside a screen or tmux session - that way it does not get interrupted when you lose the connection, and you can just reconnect and reattach once you are online again ;)
 
Didn't seem to find any packages that failed to install or failed dependencies. Reboot went fine. screen is my new friend though.
 
it's always a good idea to run stuff like upgrades inside a screen or tmux session - that way it does not get interrupted when you lose the connection, and you can just reconnect and reattach once you are online again ;)
that is true but sadly when you did it from the GUI it's not done like that so we get screwed :-(
would be great if the GUI would launch the command this way, would be much more robust.
My computer went into idle during the upgrade and now i'm stuck
 

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!