I use apt-cacher on a Debian server, and doing an apt-get update with a 16.04 client I'm finding that it's blocking a bunch of repo files including icons-64x64[.tar[.gz]], some xz extensions, Metadata and Components-*.yml.

I've managed to update the following variables on my /etc/apt-cacher/apt-cacher.conf to allow some of the file types through, but I'm still stuck on the Metadata and Components-*.yml files.

My /etc/apt/sources.list has been cut down to a single line for testing:

deb http://aptmirror:3142/au.archive.ubuntu.com/ubuntu/ xenial main restricted

apt-cacher excerpts:

index_files_regexp = ^(?:Index(?:\.bz2)?|Packages(?:\.gz|\.bz2|\.xz)?|Release(?:\.gpg)?|InRelease|Sources(?:\.gz|\.bz2)?|Contents-(?:[a-z]+-)?[a-zA-Z0-9]+\.gz|(?:srclist|pkglist)\.[a-z-]+\.bz2|release(?:\.gz|\.bz2)?|Translation-[a-z]{2,3}(?:_[A-Z]{2})?(?:\.gz|\.bz2|\.xz)?)$
installer_files_regexp = ^(?:vmlinuz|linux|initrd\.gz|changelog|NEWS.Debian|UBUNTU_RELEASE_NAMES\.tar\.gz(?:\.gpg)?|icons-64x64\.tar\.gz(?:\.tar)?|(?:Devel|EOL)?ReleaseAnnouncement(?:\.html)?|meta-release(?:-lts)?(?:-(?:development|proposed))?)$

The error:

# apt-get update
Get:1 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial InRelease [116 kB]
Get:2 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,436 kB]
Get:3 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main i386 Packages [1,431 kB]
Get:4 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main Translation-en [732 kB]
Ign:5 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata
Get:6 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main DEP-11 64x64 Icons [414 kB]
Get:7 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [10.5 kB]
Get:8 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted i386 Packages [10.8 kB]
Get:9 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted Translation-en [3,420 B]
Ign:10 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted amd64 DEP-11 Metadata
Err:5 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata
  403  Forbidden
Err:10 http://aptmirror:3142/au.archive.ubuntu.com/ubuntu xenial/restricted amd64 DEP-11 Metadata
  403  Forbidden
Reading package lists... Done
W: Failed to fetch http://aptmirror:3142/au.archive.ubuntu.com/ubuntu/dists/xenial/main/dep11/Components-amd64.yml  403  Forbidden
W: Failed to fetch http://aptmirror:3142/au.archive.ubuntu.com/ubuntu/dists/xenial/restricted/dep11/Components-amd64.yml  403  Forbidden
E: Some index files failed to download. They have been ignored, or old ones used instead.

I've tried inserting the expression Components-(?:[a-z]+-)?[a-zA-Z0-9]+\.yml and Metadata in a few different places in the above variables, without any luck.

Can anyone help me get it working?


I've got an apt-cacher on vivid. Had to change in /etc/apt-cacher/apt-cacher.conf:

ubuntu_release_names = dapper, edgy, feisty, gutsy, hardy, intrepid, jaunty, karmic, lucid, maverick, natty, oneiric, precise, quantal, raring, saucy, trusty, utopic, vivid, wily, xenial

index_files_regexp = ^(?:Index(?:\.bz2)?|(?:Sources|Packages|release)(?:\.gz|\.bz2|\.xz)?|Release(?:\.gpg)?|InRelease|Contents-(?:[a-z]+-)?[a-zA-Z0-9]+\.gz|(?:srclist|pkglist)\.[a-z-]+\.bz2|Translation-[a-z]{2,3}(?:_[A-Z]{2}(?:\.[a-zA-Z0-9-]+)?)?(?:\.gz|\.bz2|\.xz|\.lzma)?|Components-[a-z0-9]+\.yml(?:\.gz|\.bz2)?|icons-[0-9]+x[0-9]+\.tar(?:\.gz)?)$
  • Thanks, this got me really close - I ended up explicitly appending 'icons-64x64.tar' to the end because for whatever reason your regexp wasn't matching that. It's close enough for me ;) – cleary Sep 27 '16 at 7:10
  • This regex works for me. I made a miss in my copy paste of the regex (because it's long) so maybe it was your case too and you were missing the end. But for me, this regex works perfectly! – Dolanor Apr 28 '17 at 9:44
  • BTW, is there a bug report on this? It's pretty serious. I'm using it as a hobbyist, but for organizations, it could break things badly… – Dolanor Apr 28 '17 at 11:07

I had the same problem with apt-cacher-ng from ubuntu 12.04 when trying to use my mirror with ubuntu 16.04 clients.

Canonical pushed an updated package that fix the problem without any additional configuration.


Perhaps add (?:\.gz|\.bz2|\.xz)? on to the end of the expression you inserted. On my nearest mirror, the only *.yml files are actually *.yml.gz.

My install of apt-cacher-ng was having the same problem, modifying it's regexp in the way you mentioned (with addition, the syntax was also slightly different) solved it for me.


I'm using debmirror on a Netgear ReadyNAS to mirror 16.04 and came across this problem. My current "fix" (jury is still out on that) was to copy /usr/bin/debmirror from a 16.04 machine onto the NAS as it's only a Perl script and more recent versions of debmirror have a fix for this issue if I've correctly researched the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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