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.
Solution 1:
The "package index files" contain information about the packages a package repository provides. APT stores them in /var/lib/apt/lists
Solution 2:
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:
https://wiki.debian.org/RepositoryFormat#A.diff.2FIndex_files
Solution 3:
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 https://ubuntu.com/server/docs/package-management for further details.
Example: CMD to run :
cat /etc/apt/sources.list.d/mysql.list
This command list the mysql repos. Visit http://repo.mysql.com/apt/ubuntu/ and you will find the actual hosted files. Output:
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools
#deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools-preview
deb-src http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7