How to install and configure unnatented upgrade on debian 11?
- User
How to install and configure unnatented upgrade on debian 11?
- Assistant
To perform an unattended upgrade on Debian 11, you will first need to install the
unattended-upgradespackage by running the command:codesudo apt install unattended-upgradesOnce the package is installed, you will need to configure it by editing the
/etc/apt/apt.conf.d/50unattended-upgradesfile. In this file, you can specify which packages to automatically upgrade and when to schedule the upgrades.For example, to automatically upgrade all packages, you would add the following line to the file:
codeUnattended-Upgrade::Allowed-Origins { "Debian stable"; };To schedule the upgrades to occur daily, you can edit the
/etc/apt/apt.conf.d/10periodicfile and set the following:codeAPT::Periodic::Unattended-Upgrade "1";Once you have finished configuring the settings, you can test the upgrade by running the command:
codesudo unattended-upgrade -dPlease note that you should always backup your system before performing upgrades, especially if you are going to do it unattended.
- User
Comment configurer unatended upgrade uniquement pour les mises à jour de sécurité?
- Assistant
To configure unattended upgrades to only apply security updates, you will need to edit the
/etc/apt/apt.conf.d/50unattended-upgradesfile.In this file, you should add the following line to only allow upgrades from the
Debian securityrepository:codeUnattended-Upgrade::Origins-Pattern { "origin=Debian,archive=stable,label=Debian-Security"; };You also need to make sure that the
/etc/apt/apt.conf.d/50unattended-upgradesfile has the following line so that only security updates are installed:codeUnattended-Upgrade::Package-Blacklist { // };Once you have made these changes, save the file and then run the command:
codesudo unattended-upgrade -dThis command will check for updates, and install only security updates if any are available.
You can also schedule the security upgrades to occur automatically by editing the
/etc/apt/apt.conf.d/10periodicfile, and setting the appropriate schedule, for example:code