Some packages I would rather update myself, for example a database where I want to read the notes first. unattended-upgrades can leave them out.
Put your own settings in a separate file, so a package update does not collide with your edits:
sudo nano /etc/apt/apt.conf.d/52unattended-upgrades-local
Add the list:
Unattended-Upgrade::Package-Blacklist {
"postgresql";
"docker-ce$";
"libc6$";
};
The entries are Python regular expressions matched against package names. postgresql catches every package that starts with it, while the $ on the end of docker-ce$ limits the match to that exact name and leaves docker-ce-cli alone. Check the effect with a dry run:
sudo unattended-upgrade --dry-run --debug
The debug output mentions packages that are skipped because of the list.
The big catch is that a skipped package also misses its security fixes. Set yourself a reminder to update those by hand, and keep the list short. Packages that need a newer version of a blacklisted one are held back too, which can grow into a longer queue than you expected.
Further reading: unattended-upgrades example config, unattended-upgrades README