Newer Version Available

This content describes an older version of this product. View Latest

Cancel a Metadata Deployment

You can cancel a metadata deployment from Salesforce CLI and specify a wait time for the command to complete.

To cancel your most recent deployment, run project deploy cancel --use-most-recent. You can cancel earlier deployments by using the --job-id <JOBID> flag to specify the deployment that you want to cancel.

1sf project deploy cancel --job-id <jobid>

The default wait time for the cancel command to complete and display its results in the terminal window is 33 minutes. If the command isn’t completed by the end of the wait period, the CLI returns control of the terminal window to you. You can adjust the wait time as needed by specifying the number of minutes in the --wait flag, as shown in the following example:

1sf project deploy cancel --wait 20 --use-most-recent

Curious about the status of a canceled deployment? Run a deployment report.

1sf project deploy report --use-most-recent