Especially on the Raspberry Pi, it is quite often for me to lose connection while updating. I know some people setup screen or tmux sessions so that they can easily reconnect. I’m not good at remembering to do this. Angus and Cas on StackExchange shared that to resume a stopped update…
sudo kill \$(pgrep dpkg)