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!

4
  • I was tempted to ask "is there a way to get back into an old process in general?" but that seems impossible since the process was killed with SIGINT. Jun 26, 2016 at 22:12
  • Okay, I got impatient and did the kill and sudo dpkg --configure -a and it seems to have gotten me right back to where it was before! Woo :) Jun 26, 2016 at 22:56
  • (Still not certain, but it seems very promising) Jun 26, 2016 at 22:56
  • ...Okay, it finished. I'm going to restart now. Jun 26, 2016 at 23:03

1 Answer 1

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
3
  • 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! Jun 26, 2016 at 23:13
  • yep, will do, just waiting out the 2 days :) Jun 27, 2016 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, 2022 at 23:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .