What Is a Package Index File

In the following statement about "apt-get update" from linux.die.net is the term "package index file":

Used to re-synchronize the package index files from their sources. ...

What exactly does "package index file" mean? Google has not given me any answer about this.

3 Answers

The "package index files" contain information about the packages a package repository provides. APT stores them in /var/lib/apt/lists

The package index file is a file that contains information about the packages present in a repository for use with apt. The format is described here:

The APT package index is essentially a database of available packages from the repositories defined in the /etc/apt/sources.list file and in the /etc/apt/sources.list.d directory. To update the local package index with the latest changes made in the repositories, type the following:

sudo apt update

To upgrade your system, first, update your package index as outlined above, and then type:

sudo apt upgrade

I would suggest to read for further details.

Example: CMD to run :

cat /etc/apt/sources.list.d/mysql.list

This command list the mysql repos. Visit and you will find the actual hosted files. Output:

deb  bionic mysql-apt-config
deb  bionic mysql-5.7
deb  bionic mysql-tools
#deb  bionic mysql-tools-preview
deb-src  bionic mysql-5.7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest