This file below allows you to specify which packages should automatically be updated or excluded during the update process. By default, only security updates are set to be automatically installed.
sudo vim /etc/apt/apt.conf.d/50unattended-upgrades
To exclude a package from being updated, include it in the Unattended-Upgrade::Package-Blacklist section. For example, to prevent Nginx from being updated, include the name as shown below:
The configurations in the file are commented using the double slash (//). Uncomment or remove the double slash if you want to update a repository or make changes in your settining

It’s a wise to set up e-mail notifications, especially if you’re running unattended servers. You can also select “only-on-error” to receive notifications only when there
Unattended-Upgrade::Mail
Provide email of the recipient.
Unattended-Upgrade::Mail "me@example.com ";
Set it to true to enable automatic reboot.

If there are any users logged in and you still want to reboot locate the following line and set it to true
Unattended-Upgrade::Automatic-Reboot-WithUsers

There are many other settings you can change to suit your needs. Simply uncomment them as we have discussed in this section.
Once you are done, save the changes and exit the configuration file