Scenario / Questions
I accidentally pressed Ctrl+C during Ubuntu Server’s
do-release-upgrade process. I’d dropped to a shell to compare a .conf file in /etc/. When I pressed Ctrl-C, it asked whether I wanted to try to reattach to the upgrade process, but it failed to do so.
So I quit, and now there’s a hanging dpkg process which is holding onto the apt lock. This is a virtualised server with no GUI frontend…
Is it possible to recover the upgrade process, or do I have to kill the dpkg process and start again?
Find below all possible solutions or suggestions for the above questions..
I usually do release upgrades over VPN, so I’ve tried this a few times. Whenever it updates my openvpn package I lose connection, so I reconnect afterwards.
do-release-upgrade starts a backup SSH session on port 1022 and a backup screen session. If you do not have screen installed this will NOT be available.
You can get the screen session by running:
sudo screen -list There is a screen on: 2953.ubuntu-release-upgrade-screen-window (09/13/2012 04:48:02 AM) (Detached) 1 Socket in /var/run/screen/S-root.
Then to reattach do:
sudo screen -d -r root/2953.ubuntu-release-upgrade-screen-window
Using the previously listed screen after
You should be back to where you lost connection.
I had the same issue while upgrading to quantal. Unfortunately for me, like the original poster, the screen was killed as well because of ctrl+c.
Killing the dpkg and restarting it with “–configure -a” solved the problem.
I’m more of a CentOS / RHEL person myself but in my experience you’re pretty much always better of killing and starting the process over. The downloads, syncs, etc should already be complete and not need to be redone. Since that is what takes the majority of time there shouldn’t be much lost going this route.
Disclaimer: This has been sourced from a third party syndicated feed through internet. We are not responsibility or liability for its dependability, trustworthiness, reliability and data of the text. We reserves the sole right to alter, delete or remove (without notice) the content in its absolute discretion for any reason whatsoever.