How to update debian packages via cli or terminal?

This article describes how to update and display installed packages under the operating system Debian via terminal.

To update the packages in Debian not many commands are necessary. First the package sources are updated and then the packages themselves.

Additionally you can check before the update which packages can be updated at all.

Checking for updates

apt update

View available updates

apt list --upgradable

Install Upgrades

It can happen with certain packages that APT asks whether it should overwrite an existing configuration file. In most cases the correct answer is **NO, please do not overwrite. **

apt upgrade -y