According to the documentation the Yum prerelease cleanup policy specifically looks at the “release” component of the RPM name for the prerelease text
The non-case-sensitive “release” property in the RPM header contains one of the following: alpha, beta, rc, pre, prerelease, snapshot
But according to the Yum/RPM naming convention, that text is supposed to go in the “version” component.
I tried this out on my local Nexus3 repository. I created an empty RPM with the text “~beta4” in “version” property and sure enough, the cleanup policy DID NOT find that artifact.
It seems the current Nexus3 cleanup policy violates the RPM naming convention.