Debian

How to Keep Debian 12 System Up-to-Date

Debian releases new updates and patches for the system quite frequently. It’s a good idea to always keep the Debian 12 system up-to-date to get the latest security updates, patches, and bug fixes.

In this article, we will show you how to keep your Debian 12 system up-to-date.

Topic of Contents:

  1. Checking Debian 12 for New Updates
  2. Listing the Debian 12 Upgradable Packages
  3. Updating the Debian 12 System
  4. Rebooting Debian 12
  5. Conclusion
  6. References

Checking the Debian 12 for New Updates

To check if the new updates are available for your Debian 12 system, run the following command:

$ sudo apt update

As you can see in our Debian 12 system, 37 packages can be upgraded.

Listing the Debian 12 Upgradable Packages

To list all the Debian 12 packages that are available for upgrade, run the following command:

$ apt list --upgradable

As you can see, a list of all the Debian 12 packages that are available for upgrade is displayed. You will find a lot of information on the packages that can be upgraded from here. It includes information like the version number of the packages that are currently installed (upgradable from) and the version number of the packages that will be installed after the upgrade.

Updating the Debian 12 System

To upgrade your Debian 12 system, run the following command:

$ sudo apt dist-upgrade

An overview of the packages that are to be upgraded will be displayed.

To confirm the upgrade, press Y and then press <Enter>.

A screenshot of a computer Description automatically generated

All the upgrades are being installed. It takes a while to complete depending on the number of packages being upgraded.

A screenshot of a computer Description automatically generated

At this point, all the available updates should be installed on your Debian 12 system.

A screenshot of a computer Description automatically generated

Rebooting Debian 12

For the changes to take effect, you must restart your Debian 12 system after all the updates are installed.

$ reboot

Once your Debian 12 system boots, you can check if any more updates are available to install. You should see that all the packages are up-to-date.

$ sudo apt update

A computer screen with text and a green arrow Description automatically generated

Conclusion

Keeping your Debian 12 system up-to-date is very important. In this article, we showed you how to check if new updates are available on Debian 12. We also showed you how to install the available updates on Debian 12.

References:

Chapter 9. Keeping your Debian system up-to-date

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.