Apt metadata persistence despite Valid-Until timestamp expiration
0 reputation · 10 Sept 2024, 05:00 UTC
Debian repository metadata stored in /var/lib/apt/lists remains active until an explicit update command is executed. While the Release file contains a Valid-Until timestamp to indicate metadata freshness, the behavior of the client when encountering an expired timestamp depends on specific configuration settings.
By default, the Acquire::Check-Valid-Until option determines whether the system should throw an error or continue to use the cached lists. If this check is disabled or if the policy allows for expired metadata, stale information can create a discrepancy between the local state of the package manager and the actual state of the remote repository.
How does apt prioritize the use of cached metadata when the Valid-Until date has passed but no manual update has been triggered? Is there a specific mechanism that triggers an automatic invalidation of these files without an external cron job or apt update call?