Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a local mirror (created with debmirror), and when I run apt-get update after a few days, I get this:

E: Release file expired, ignoring file:/home/wena/.repo_bin/dists/sid/Release (invalid since 14h 31min 45s)

How do I work around that?

share|improve this question
up vote 30 down vote accepted

Add this to the command:

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

For example:

sudo apt-get -o Acquire::Check-Valid-Until=false update
share|improve this answer
This worked, but some explanation of why it did would be useful. – Faheem Mitha Sep 9 '14 at 23:17

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.

share|improve this answer
Thanks for that one. I should have looked inside that file before asking. Curiously though, is this a new thing? It didn't happen before (but once). – Tshepang Sep 30 '10 at 11:58
I don't use debian really often at the moment, but maybe they just changed the release file cycles to a shorter date... – echox Sep 30 '10 at 12:03

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, that will never be bothered again with the mentioned warning at all.

share|improve this answer

Some of the mirrors out there might have stale files. This happened to me recently, and it was in also tied to the caching server I'm using (apt-cacher-ng) which tries to save bandwidth by redirecting the repositories for same archive to a single entity (in my case if was a Hungarian mirror). Direct updates through German mirror worked ok, for example. Try changing the mirror you're using. In case you're using apt-cacher-ng, you'll need to do something in the line of changing the following file's contents:

  • /etc/apt-cacher-ng/backends_debian
  • /etc/apt-cacher-ng/backends_debvol

After that you should also restart apt-cacher-ng for changes to take effect.

share|improve this answer
Note that I was asking for a workaround, not why this was happening (good answer though). In this case I was, knowingly, having a stale repository. – Tshepang May 13 '11 at 12:44

I removed /var/lib/apt/* and rerun apt-get update, and it works!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.