How to work around "Release file expired" problem on a local mirror

Add this to the command:

-o Acquire::Check-Valid-Until=false

For example:

sudo apt-get -o Acquire::Check-Valid-Until=false update

If you do not care about this check, no matter for which mirror, just create a file in /etc/apt/apt.conf.d/ (e.g. name it 10no--check-valid-until) and put the option directly in there:

Acquire::Check-Valid-Until "0";

After this, you will never be bothered again with the mentioned warning at all.


The release files have a valid-until entry, e.g. Valid-Until: Thu, 07 Oct 2010 08:17:56 UTC

If the release file isn't valid anymore, you should run debmirror again to check if there are any changes in the repository. One change will be the release file and you will get a new validity for it.

You could easily automate this with a crontab entry.

Tags:

Apt