Is it possible to exclude certain rpm's to be downloaded from a source repository?

I am wondering in Spacewalk I was able to create a exclude list like “-libreoffice*,-firefox*”
when setting up the repository configuration.

Question:
Is it possible to configure foreman, to exclude certain rpm’s from being downloaded when running a sync?
The reason why I am asking is; the EPEL repo is large and contains a lot of rpm I do not require.

Thanks.

No. You cannot filter during the sync. However, you can set the repository to “on demand”. Then any package will only be downloaded when requested by a client. The advantage is that you don’t have to worry about dependencies between packages in the repository.

If you want to make only certain packages available to the clients you can use a content view to filter what clients can see.

Thanks, that’s what I was assuming when reading the manuals.

Please be aware the “on-demand” syncing might not work as intended when the repository you’re syncing from cleans up older versions of packages (which I think EPEL does), as your content view might refer to a version that is not available on the main repository anymore and if that version is not cached on your instance, it will try to fetch it from the repository and get a 404.