6

I was upgrading from 15.10 to 16.04 and I got some prompts about config files having changed, e.g. /etc/xdg/autostart/at-spi-dbus-bus.desktop. So I type D to see the diff, but then accidentally hit ctrl+c (intending to copy out the diff) instead of ctrl+shift+c. Just a slip of the fingers.

Anyway, this promptly seemed to quit the upgrade process (although leaving the terminal in a weird state), but of course it wasn't finished installing! Although running sudo do-release-upgrade gives No new release found. How do I get back into the installation process? I can tell dpkg is running because it's locked. sudo lsof /var/lib/dpkg/lock yields:

COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
dpkg    29329 root    3uW  REG    8,7        0 262367 /var/lib/dpkg/lock

I'm worried now that if I restart my computer, it won't boot up at that point, and I'm hoping there's a way to resume installation without having to reboot into recovery mode etc. Kind of annoyed too that it quit so easily by pressing ctrl+c.

One option of course, as described here, is to kill my dpkg process then try running sudo dpkg --configure -a... but I figured I'd ask here if there are any ideas before I do something that could be irreversible.

Alternatively, if someone knows that the specific stage I stopped at (config files) is early enough that it's nbd, that would also be helpful!

1 Answers1

12

This worked! I'm now the happy user of 16.04.

sudo lsof /var/lib/dpkg/lock
sudo kill -TERM <PID>
sudo dpkg --configure -a
  • Please feel free to "accept" your answer by clicking the gray check-mark beside it; that way other people can see at a glance that your issue is resolved. I'm glad you got it working! – Nick Weinberg Jun 26 '16 at 23:13
  • yep, will do, just waiting out the 2 days :) – MalcolmOcean Jun 27 '16 at 14:04
  • 1
    Dude, this worked for me in 2022 (upgrade from 20.04 to 22.04 hung), you got yourself another 10 Brownie points! – Raffles Aug 25 '22 at 23:20