Newest Only Sync Option?

Problem:

When syncing a repository via the GUI, there is no option to specify to download only the newest versions of packages.

Expected outcome:

Synced repository has the latest versions of packages.

Foreman and Proxy versions:

Foreman 3.3.0
Katello 4.5.0

Foreman and Proxy plugin versions:

Foreman 3.3.0

Distribution and version:

Red Hat Enterprise Linux 7.9

Other relevant data:

The Foreman instance is acting as the downstream from a Red Hat Satellite 6.10 server. I intend to have the Foreman server host updates for an airgapped or disconnected network. The Foreman server is the only server on the network that can communicate with the Satellite server.

After some troubleshooting, I realized that the download policy for the synced repositories needed to be changed from On Demand to Immediate.

I believe for RPM content this exists: When you switch to “Mirroring Policy: Additive”, then the additional field “Retain package versions” appears in the UI. Set this to 1 to only retain the latest version of each package.

Not sure if this exists for any content types other than RPM.

I tried this out and it seems to be exactly what I’m looking for. Thank you!

If you get this to work, let me know. Been fighting with this “Retain package versions” setting and never gotten it it limit the number of versions. The repos I have this setting on, keep all versions.