One thing to note about the sudo apt upgrade command is that it only upgrades packages and dependencies but doesn’t remove anything. Finally, the packages will be installed and upgraded. If you continue with the upgrade, it will download and unpack the packages. You should enter Y, y, or yes to continue the upgrade. In the end, you will see a prompt showing the amount of storage required for the upgrade and asking for your permission. The output below shows the list of the packages to be upgraded. These are the new packages that will be installed in your system. Let’s see the other part of the output of the sudo apt upgrade command. You can remove these packages with the sudo apt autoremove command. The output shows the automatically installed packages due to some dependency resolution. The output above displays just a small portion of upgradable packages. You can use the following command to see the packages that can be upgraded. Hit:1 stable InReleaseġ908 packages can be upgraded. Now, let’s implement these commands practically.įirst, use the sudo apt update command. How to Use the apt update and apt upgrade Commands? Here we skipped installing all new packages entirely and only installed one new package(or version). In case you do not want to install all the newer versions that are available for several packages and only want one in specific, you can do that by running: sudo apt update Note that it isn’t mandatory to use these two commands together all the time. These commands can also be written in the following form. So, we use these commands in the following order: sudo apt update When we enter this command, we’re sending a command to our machine to check and compare the versions of all the packages that are installed in our machine currently with the packages in the list that we copied earlier through sudo apt update, and then upgrade the packages whose newer versions are available. On the contrary, sudo apt upgrade updates all the currently installed packages in our machines to their latest versions. When we enter this command, we send a command to browse the package list and copy the latest version to our local machine. The command checks for the latest list of available packages in the repositories. It is necessary to note that update doesn’t install any packages or even upgrade them. sudo apt update updates the list of all packages that are available along with their versions. apt, as mentioned earlier, invokes the Advanced Package Tool. Let’s learn the sudo apt update command in detail first.Īs you’re trying to add or modify packages, you need to have root privileges. ![]() How to Use the apt update and apt upgrade Commands?ĭifference Between the sudo apt update and sudo apt update Commands.Difference Between the sudo apt update and sudo apt update Commands.It is, however, true that both needed to be worked on simultaneously in most cases. But they are fundamentally very different based on their job description. Superficially, update and upgrade sound similar, and as the other words are already the same, both should do the same thing. Many users are curious about the differences between these two commands, and many Linux forums are flooded with this question. Whatever your goal, the use of apt update and apt upgrade is inevitable. Or maybe you needed to fix something, and an article suggested you run these commands. You might remember the first time you tried to install a package in your system and used these commands as follows. Sudo apt update and sudo apt upgrade are two of the most used commands in Ubuntu and Debian-based distributions. Most software packages contain an executable program, metadata files, documentation, and configuration files. ![]() Software packages can be software like text editors, IDEs, media players, device drivers, and more. Repositories, also called repos, are storage locations for maintaining software packages. It consists of a bunch of tools that can install, update, remove, or manage the packages that are installed or available for distribution. Linux has an advanced package management tool called Advanced Package Tool, commonly referred to as APT ( apt).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |