

New packages are added, and old packages are removed. The list of packages can change over time. I'm afraid that if I launch apt-get update command at different time, the result would be different and so my images would be different.Īpt-get update downloads the list of available packages. One property of this image is that it should always be the same, whatever the context is (time of build, etc). One of its feature is the Dockerfile, which allows you to build a sort of OS image by executing some instruction from this file. I ask my question because I am studying the Docker framework. Is there some agreed politic about deb repositories? For example, should a repository only contains the last version of a package, or on the contrary should it contains all versions available for a specific distribution release?.What happens if I do apt-get install without updating the cache? Is there a chance that the remote package would not exist anymore and that the link would be broken?.Where is stored the package index? On a database? On a file?.An update should always be performed before an upgrade or dist-upgrade. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list(5). Not just a copy of the man page, unless your version is really detailed (I put one definition from man page below).Īpt-get update: Used to re-synchronize the package index files from their sources.

Could some explain what the command apt-get update does and when I really should use it?
