Raspberry Pi_Eng_17.7.2 “apt-get update” command – Update Local Package DB


Published Book on Amazon


All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


17.7.2   "apt-get update" command - Update Local Package DB

 

The "update" command is used to update the program package information in the local package repositoroty installed on the system to the latest version. When this command is executed, the package information stored in the local package repository is updated to the latest version, and the latest package file for the installed program is downloaded and archived.

 

[Command Format]

apt-get update

 

[Command Overview]

   This updates the program package information in the local package repository installed on the system to the latest version.

   User privilege          -- Super user.

 

[Detail Description]

   This command updates the package list in the local database by downloading the package list from the repository on the server to obtain information about the new version of the package and their dependencies/impact.

   This command does not actually install a new version of s/w. It only does preparatory work.

   The index of the available packages is taken from the location specified in "/etc/apt/sources.list".

   The "update" command should always be performed before "upgrade" command or "dist-upgrade" command.

   As updating this package information or downloading the required package file is done automatically from the internet, you must have internet connection when executing this command.

 

[Used Example]

The following is an example of running the "apt-get update" command.

 

pi@raspberrypi3:~ $ sudo apt-get update

Get:1 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB]

Get:2 http://mirrordirector.raspbian.org jessie/main armhf Packages [8,981 kB]

Hit http://archive.raspberrypi.org jessie InRelease

Hit http://archive.raspberrypi.org jessie/main armhf Packages

Hit http://archive.raspberrypi.org jessie/ui armhf Packages

Ign http://archive.raspberrypi.org jessie/main Translation-en_GB

Ign http://archive.raspberrypi.org jessie/main Translation-en

~~Skip

~~Skip

 

Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB

Ign http://mirrordirector.raspbian.org jessie/main Translation-en

Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB

Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en

Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB

Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en

Fetched 9,105 kB in 41s (220 kB/s)

Reading package lists... Done