# APT proxy metadata problems

## post by pogacnik on Mar 28, 2022

“apt update” command returns error:

E: Failed to fetch [http://XXXXXXXXX/repository/apt-download-docker-proxy/dists/bionic/nightly/binary-amd64/Packages.gz](http://xxxxxxxxx/repository/apt-download-docker-proxy/dists/bionic/nightly/binary-amd64/Packages.gz) File has unexpected size (71462 != 71267). Mirror sync in progress?

It happens occasionally on different proxied repositories.

- [Apt proxy for Ubuntu not working](https://community.sonatype.com/t/apt-proxy-for-ubuntu-not-working/9581/2)

## post by joeplaa on Aug 7, 2022

I have the same issue. So far I’ve only had this when using my Nexus apt proxies on Desktop Ubuntu installations. This error never happens on the server edition.

I have added the exact same entries in `/etc/apt/sources.list` in the server and desktop editions of Ubuntu Bionic, Focal and Jammy. Every single time the server edition works, the desktop won’t.

I think it is related to downloading/generating images (icons) for the software manager in the desktop version, but I’m not sure. That is where my debugging skills end.

## post by slv_b on Aug 15, 2022

I have the same issue.

[https://FQDN/repository/ubuntu-focal/dists/focal-security/main/binary-i386/Packages.xz](https://fqdn/repository/ubuntu-focal/dists/focal-security/main/binary-i386/Packages.xz) File has unexpected size (479908 != 480080). Mirror sync in progress?

I test my local ubuntu mirror and compare with "https://archive.ubuntu.com/ubuntu/dists/focal-security/"

Files `Packages.xz` and` InRelease` in local mirror are the same as in `http://archive.ubuntu.com/ubuntu/dists/focal-security/` with size 479908

`Packages.xz` in nexus cache is the same like in `http://archive.ubuntu.com/ubuntu/dists/focal-security/` and local mirror too.

But` InRelease` in nexus cache is older than in local and remote mirrors. And the size of `Packages.xz` in that file is equal 480080.

Only manual (or via general rest api) “clear cache” and “invalidate index” helps to fix that problem .

Are there any ideas how to fix that problem?

Repo apt proxy

## post by pogacnik on Nov 18, 2022

For me, it helps if I manually delete the metadata directory from the repo and let it cache again. But this is not a proper solution.

## post by pogacnik on Jan 31, 2024

Metadata file size on nexus does not match metadata file on remote url, even if I delete locally cached metadata files and redownload them:

Remote url: [Index of /ubuntu/dists/jammy/by-hash/SHA256](http://si.archive.ubuntu.com/ubuntu/dists/jammy/by-hash/SHA256/)

## post by mpiggott on Jan 31, 2024

Looks like the remote is returning the transfer size which is gzipped.

You can verify this by downloading one of the files with a web browser.

## post by joeplaa on Jan 9, 2025

This seems to be fixed. I don’t know as of which version, but I’m currently on 3.75.1-01 and can run `apt update` and `apt upgrade` on my desktop just fine.

```auto
joep@PCJOEP:~$ sudo apt update
Hit:1 https://nexus20.joeplaa.com/repository/ubuntu jammy InRelease
Hit:2 https://nexus20.joeplaa.com/repository/ubuntu jammy-updates InRelease
Hit:3 https://nexus20.joeplaa.com/repository/ubuntu jammy-backports InRelease
Hit:4 https://nexus20.joeplaa.com/repository/ubuntu jammy-security InRelease
Hit:5 https://nexus20.joeplaa.com/repository/docker-apt jammy InRelease
Hit:6 https://nexus20.joeplaa.com/repository/microsoft-edge-apt-proxy stable InRelease
Hit:7 https://ppa.launchpadcontent.net/ansible/ansible/ubuntu jammy InRelease
Hit:8 https://ppa.launchpadcontent.net/kdenlive/kdenlive-stable/ubuntu jammy InRelease
Get:9 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease [7.565 B]
Hit:10 http://old-releases.ubuntu.com/ubuntu kinetic InRelease
Get:11 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease [7.456 B]
Get:12 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease [7.450 B]
Hit:13 http://download.proxmox.com/debian/pbs-client bookworm InRelease
Get:14 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease [7.449 B]
Get:15 https://nvidia.github.io/libnvidia-container/stable/deb/amd64  InRelease [1.477 B]
Hit:16 https://deb.volian.org/volian nala InRelease
Fetched 31,4 kB in 1s (26,8 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://download.proxmox.com/debian/pbs-client bookworm InRelease' doesn't support architecture 'i386'
joep@PCJOEP:~$
```

## post by pogacnik on Jan 10, 2025

Thanks for your reply, yes it works now, it was solved in a day.
