Hello im a Devops Specialist. I understand your requirement to remove rpms if it exists on remote. It will be good if you share your declarative pipeline so i can test and run in my local.
Relevant Skills and Experience
Devops Specialist, Jenkins, kubernetes expert