I started aptitude dist-upgrade over SSH on my local network. At some point the session timed out but the upgrade was not finished (it was left at one of those accept software agreement screens-- I forget which one so I don't know how far into the upgrade I got, but the point is that right now it is idle waiting for me to accept).

I SSH'ed back into my server and see that the aptitude process is still running. What is the safest way to proceed? I did not use screen so is there any way to resume the running aptitude process? If not, what is the safest way to kill and restart it?

2 Answers 2


Just kill it with kill and run it again. It won't download anything already downloaded, and it will finish the upgrade. If it can't continue because your system is in a broken state, apt-get -f install should fix it.

  • 6
    Yep, +1. This has worked for me (but with apt-get rather than aptitude) for over a decade. I'd suggest running dpkg --configure --pending between killing the original aptitude and running it again. That will configure everything that's already been installed but hasn't been configured yet (except for packages with unresolved deps).
    – cas
    Commented Aug 29, 2012 at 6:28

On Ubuntu (at least), the upgrade is executed in a screen session that can be resumed:

sudo screen -ls
sudo screen -r <screen number>

You must log in to answer this question.

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