While SSH'd into a server, I was running sudo apt-get upgrade
and I accidentally caused the session to quit (Write failed: Broken Pipe
) by doing nothing while the installation was waiting on a prompt.
I was not using screen
or anything like that, so now there are rogue processes:
$ ps aux | grep apt
root 20863 0.0 0.5 51088 23600 pts/0 S+ 16:08 0:00 apt-get upgrade
root 23033 0.0 0.2 16220 10940 pts/1 Ss+ 16:12 0:00 /usr/bin/dpkg -
I understand that it's impossible to regain control and get back to the prompt without screen or similar, but what is the best course of action? Kill the processes? Break the lock?
This question describes the problem, but not a course of action without screen: How can I reconnect to a ssh session after a broken pipe?
reptyer
to bring the rogue process to a screen session you started after the reconnecting: rvdh.de/2014/03/26/…reptyer
installed at the time