There's an irony of you wanting to do a manual upgrade: Unattended Upgrades is already doing exactly that for you. When systemd detects that your newly-booted system has missed it's apt-update and apt-upgrade timers, it promptly triggers them.
- For most users, simply let those jobs complete -- it what you wanted to do anyway. Monitor
/var/run/apt/periodic to find out when Unattended Upgrades finished it's work.
However, for your use case of long periods between booting, consider editing
/etc/apt/apt.conf.d/20auto-upgrades to disable automated updates and upgrades. We recommend against most users disabling merely so they can upgrade manually...folks tend to slack on that method after a few weeks.
Making Unattended Upgrades abortable is possible, but it's NOT RECOMMENDED for most general purpose users.
/etc/apt/apt.conf.d/50unattended-upgrades to enable this option:
// Split the upgrade into the smallest possible chunks so that
// they can be interrupted with SIGTERM. This makes the upgrade
// a bit slower but it has the benefit that shutdown while a upgrade
// is running is possible (with a small delay)
Obviously, you must have a clear understanding of how to use SIGTERM.
Note that the same file has a setting to move Unattended Upgrades to shutdown (like Windows).
Alternately, automated updates and upgrades use systemd timers. You can change the time at which they run by simply editing /lib/systemd/system/apt-daily.timer and /lib/systemd/system/apt-daily-upgrade.timer. Remove the randomization and specify the constant time you wish.
For General Purpose Users: You probably don't need any of these tools, but they are available. In general, DO NOT INTERRUPT APT under most circumstances. Doing so inexpertly WON'T release the lock, and may damage your system. Cleaning up after an apt breakage can be confusing and tedious...and is completely avoidable. For most users (including experts), best practice is to simply wait 5-10 minutes until apt completes it's task. Good time for a sandwich.
- 5-10 minutes really means that. Be patient. The time to get concerned and seek help is if apt seems to make no progress for, say, 20 minutes or more. (20 minutes is not a rule -- that's my personal guideline).