What Does “sudo apt-get update” do?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/sudo-apt-get-update/
PINTEREST
PINTEREST
INSTAGRAM

We have examined the apt-get  and its sub commands in a detailed manner previously. apt-get  is used to manage installed packages in a Linux distribution like Ubuntu, Debian, Mint, Kali etc. Here we will look simply sudo apt-get update  and related commands to update a deb based Linux distribution. For detailed tutorials look following.

How To Apt-Get Update, Upgrade, Dist-Upgrade, Full-Upgrade and Their Similarities and Diffirencies

How To Install Updates In Ubuntu, Debian, Mint, Kali

Get Root Privileges with “sudo”

Actually this is not separate command or step. It is used with apt-get update but I wanted to explain in detail. apt-get  command requires root level privileges to change package database. This is a security enforcement for the Linux systems. In order to write changes to the apt  database we need to be root or root level user or gain privilege with sudo  command. For example following command will run as root and provide root user information.

Get Root Privileges with "sudo"

Get Root Privileges with “sudo”

Update Package Information About Repositories

Now we will examine the real command sudo apt-get update . This command will update deb or apt-get package database. The newer version information will be written into this database. But keep in mind that packages will not upgraded as it is separate or next step. This is useful if we want to upgrade some specific packages and do not upgrade others.

Update information will be fetch from configured repositories which is us  repositories in this example as we can see. This will only download packages metadata those have updates and do not download whole packages.

LEARN MORE  Apt and Apt-Get Tutorial With Examples

Update Package Information About Repositories

Update Package Information About Repositories

Upgrade Packages

The last step is upgrading the packages. We have all ready the information about updates and this step will trigger the upgrade process the real packages will be downloaded, installed and configured accordingly. We will use sudo apt-get upgrade  which requires root privileges too.

Upgrade Packages

Upgrade Packages

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/sudo-apt-get-update/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)