In case one or many packages have been promoted to an environment, yet in the deployment phase they are either unwanted to be deployed or they are preventing other packages to be deployed, this system job in Jenkins (System_job_demote_promotion), can be used for demoting them (ie. removing them from the promoted packages).
Open System_job_demote_promotion from Deployment Management
Press Build with Parameters.
Enter at least one of parameters:
environmentName - The name of the environment involved
targetInstanceId - Identifier of the target instance
commitId - Commit Identifier which should be demoted if being promoted
packageId - Package Identifier which should be demoted if being promoted
Discovered promotions in selected environments will be demoted.
The environment name and the targetInstanceId can be spotted, for example from the package deployment job console output, where this information is printed before deployment to the environment is getting triggered.
The discovered package promotions are DEMOTED (removed from installation queue) and shown in the System_job_demote_promotion console output. Package job builds affected by the demotion will be seen as aborted.