Retain old deb package versions on Nexus APT proxy repo

Bringing up this old conversation since I want to achieve the same functionality but I’m hitting an issue:

The metadata which Nexus APT proxy exposes seems to ignore the removed packages from the remote repository

In practice in my APT proxy :

  • dists/focal/main/binary-amd64/Packages.gz only mentions one package version (package_1=1.3)
  • package_1 has 2 version in the packages folder : 1.3 and 1.2
  • so on the APT client side, I can only install version 1.3, package_1=1.2 is not found anymore

Is there any way to handle the Packages.gz listing differently ? For example, regenerating it to contain the whole list of cached packages instead of the remote ones ?