
Do become a member for more Linux tips and tutorials. I hope you liked this Debian beginner tip. Everything is done in a single command even if it is a combination of multiple commands. This way, you don't need a manual intervention while updating Debian. You can save some time by supplying it with yes thanks to the -y. Why is the -y option used here? Because the apt upgrade needs your conformation before downloading and updating the system. With &, the second command apt upgrade -y, runs automatically after the first command finishes successfully. The & option is one of the ways to run multiple Linux commands at once. Thus, all the software component of your Debian systems are upgraded to the newer version. With that information, the apt upgrade command fetches the new version of the packages from the Debian repositories and installs them. It is important to run the apt update command before so that your system is aware about the availability of the new version of packages. This is the command that actually updates your Debian system. In fact, you can see the packages that can be upgraded using: sudo apt list -upgradable sudo apt upgrade Thanks to this your system can see if an installed package has new version available. When you run the apt update command, it updates this local cache from the Debian repository. The apt package manager works on a local database of metadata (name, version, description and repository information) about software packages. It may seem like this command will update the system but that's not true. This includes Linux kernel updates provided by Debian. You can use it to update all the software on your system at once. With the apt command, you can install, remove or manage software packages. Let me explain what you are doing here to update Debian.Īpt or the older apt-get are command line based package manager for Debian Linux. You can also provide the conformation automatically using -y: sudo apt update & sudo apt upgrade -y Updating Debian explained

Press Y key when you are asked to confirm.Īlternatively, you can combine the above two commands with the help & operator. apt also prompts you with the number of packages that can be upgraded when you update the repository database. Update the local package database cache with: sudo apt updateĪnd then update all the installed software, kernel and other system components at once using: sudo apt upgrade

Here is an alias I save in ~/.If you want to update Debian Linux system, here's what you need to do. To run on your local box just leave off that first line doing the ssh Sudo apt-get -o Dpkg::Options::="-force-confnew" -yy dist-upgrade -y & \ This script is handy to automate updates including removing unneeded packages and performing a reboot only if the OS wants one remote_user=usernamehere
