Ubuntu – Ubuntu checks just 5 links on sudo apt-get update

aptpackage-managementupdate-managerupdates

I installed Ubuntu 16.04 LTS today and then enabled universe by:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"

After that I ran:

sudo apt-get update

and the list showed quite a lot of links.

After that I ran the Software Updater which crashed midway. After rebooting it installed the updates just fine, but after rebooting again, whenever I run apt-get update, Just 5 links appear instead of the 50~60 before.

The 5 links are:

aditya@Aditya-ASUS:~$ sudo apt-get update
[sudo] password for aditya: 
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Hit:3 http://in.archive.ubuntu.com/ubuntu xenial InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]   
Hit:5 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease  
Fetched 190 kB in 2s (71.2 kB/s)
Reading package lists... Done

Is this normal or is there a problem.

Here is my Sources.list:

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://in.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial universe
deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://in.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://archive.ubuntu.com/ubuntu xenial universe main multiverse restricted
# deb-src http://archive.ubuntu.com/ubuntu xenial main universe restricted multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial main universe restricted multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

Best Answer

sudo apt-get update fetches Indices of the package list from repositories. But it does so with an order, both for security and to reduce download size of the Package Indices.

For each repository,

First, it tries to match the modification time of the InRelease file (which is an Inline signature file) in the online-repository with the one already downloaded in your computer (if there is any).

  • If it finds that the InRelease file is not modified in online-repository, it doesn't proceed to download the index file (Packages.gz etc), which are bigger and actual index, provided that it is already downloaded in your computer. Because not modified signature means index file isn't modified.

  • If it finds that the InRelease file's modification date is changed, it will first get the InRelease file. Then again try to match the checksum (found in InRelease file) of to the already downloaded Index. If that matches, it won't download the index. Otherwise, Downloads the Index.

There are more things done behind the scene. But basically in your case, it means, since you just updated package list with sudo apt-get update, It is normal to have shorter output later, because in this shorter time period nothing in the repository has changed.

Check this for further info: