![]() 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. 4.Linux has an advanced package management tool called Advanced Package Tool, commonly referred to as APT ( apt). Here, the -y flag adds the validation apt needs to carry out the process. 183943 files and directories currently installed.) Get:25 focal-updates/main amd64 ubuntu-report amd64 1.6.1ubuntu0.1 Optionally, we can modify the upgrade command to download and install the packages without prompts: Next, the upgrade command waits for confirmation to download and install. These upgrades can come from previous info on system updates that weren’t upgraded.Īfter using apt-update, we can run apt-get upgrade to download and install available upgrades in one go: $ sudo apt-get upgradeĢ5 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.Īfter this operation, 41.5 MB of additional disk space will be used.Īgain, the output shows that the command first reads the package lists, which contain the metadata from the update command. However, the upgrade command can proceed if there are available upgrades already on the system. ![]() The following packages have been kept back:Ġ upgraded, 0 newly installed, 0 to remove and 1 not upgraded Without any available update on the system, the apt-get command doesn’t upgrade any package: $ sudo apt-get upgrade Usually, the update command precedes the upgrade command. Of course, it gets the data from the sources in the /etc/apt/sources.list file. ![]() The command apt-get upgrade installs the newest versions of all packages on the system. Otherwise, the data for the sources in the /etc/apt/sources.list file remains the same, in which case apt list –upgradable might not show any available updates: Note that it’s important to run apt-get update first before running apt list –upgradable. In addition, it shows the new upgrade version and gives a hint on the version change like in the example: Now, the output of this command is a list of all upgradable packages. To list all the packages available for updating, assuming we’ve already run apt-get update, we can use the apt list –upgradable command: $ apt list -upgradableĭbus-user-session/focal-updates,focal-security 1.12.16-2ubuntu2.3 amd64 ĭbus-x11/focal-updates,focal-security 1.12.16-2ubuntu2.3 amd64 ĭbus/focal-updates,focal-security 1.12.16-2ubuntu2.3 amd64 ĭistro-info-data/focal-updates,focal-updates 0.43ubuntu1.11 all įirefox-locale-en/focal-updates,focal-security 107.0+build2-0ubuntu0.20.04.1 amd64 While the update command refreshes the package cache, it doesn’t list all the possible updates. Inactive sources are commented out using a # at the beginning of the line. The sources set on the system are defined via deb-src. We can view the content of the sources.list file using the cat command: $ cat /etc/apt/sources.list ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |