Prune Versions

[Internal] Apply versioning policies to keep only a limited number of versions.