Usually I upgrade my Ubuntu installation through a ssh connection. Sometimes this ssh connection would be lost or I would accidentally close the terminal window.
It is possible to check the upgrade status after a ssh re-login into the computer?
The following logs are related to apt upgrades:
If the command was
FYI, it is usually safe to just re-run the upgrade and apt will continue where it left off when the process died due to disconnection. However...
A GNU Screen Primer:
When ssh'ing into a remote server and starting a long-running process in the foreground, it is best practice to use GNU Screen. Screen provides a virtual terminal that continues running even if your ssh connection is lost.
After running screen you will get a command line prompt as with a normal terminal. You can then run the upgrade from inside screen:
To understand how this works, "detach" screen by pressing Ctrl+a, d. This will return you to the non-screen terminal. You can see the list of running screens with
If you only have one screen running, you can reattach it with:
(This detaches screen in case it is attached elsewhere, and reattaches it to the terminal you are currently running.)
Typically you cannot scroll 'normally' from within screen without some extra setup. To scroll within screen, press Ctrl-Esc to enter cursor mode. You can then scroll down and up with j and k. Press Esc again to exit cursor mode.
There are many more resources on the net available for additional screen functions. It is an invaluable standard tool for system administration.