---
schema_version: "1"
id: 330ed667df8e25b36d1c486dce7df0a29e1d67742a65fadc9c3094d5e2212d88
title: project deploy cancel
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfclireference/guides/project/cli_reference_project_deploy_cancel.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_project_deploy_cancel.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0cfe6b48e516116fed3a3b7029ed28020a1f8c6f40b1c69ecf743c958655b4fb
products:
  - Salesforce CLI Command Reference
  - salesforcedx
---
<!-- prettier-ignore-start -->

# project deploy cancel

Cancel a deploy operation.

## Description for project deploy cancel

Use this command to cancel a deploy operation that hasn't yet completed in the org. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.

Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.

## Aliases for project deploy cancel

`deploy:metadata:cancel`

## Flags

| Flag Name (Long) | Flag Name (Short) | Description |
|------------------|-------------------|-------------|
| <code>&#8209;&#8209;async</code> | N/A | **Type:** Boolean<br><br>Run the command asynchronously.<br><br>The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the cancellation, run "sf project deploy resume". To check the status of the cancellation, run "sf project deploy report". |
| <code>&#8209;&#8209;flags&#8209;dir</code> | N/A | **Type:** Value<br><br>Import flag values from a directory. |
| <code>&#8209;&#8209;job&#8209;id</code> | <code>&#8209;i</code> | **Type:** Value<br><br>Job ID of the deploy operation you want to cancel.<br><br>These commands return a job ID if they time out or you specified the --async flag:<br><br><ul><li>sf project deploy start</li><li>sf project deploy validate</li><li>sf project deploy quick</li><li>sf project deploy cancel</li></ul><br><br>The job ID is valid for 10 days from when you started the deploy operation. |
| <code>&#8209;&#8209;json</code> | N/A | **Type:** Boolean<br><br>Format output as json. |
| <code>&#8209;&#8209;target&#8209;org</code> | <code>&#8209;o</code> | **Type:** Value<br><br>Username or alias of the target org. |
| <code>&#8209;&#8209;use&#8209;most&#8209;recent</code> | <code>&#8209;r</code> | **Type:** Boolean<br><br>Use the job ID of the most recent deploy operation.<br><br>For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less. If your most recent deploy operations was more than 3 days ago, this flag won't find a job ID. |
| <code>&#8209;&#8209;wait</code> | <code>&#8209;w</code> | **Type:** Value<br><br>Number of minutes to wait for the command to complete and display results.<br><br>If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To resume watching the cancellation, run "sf project deploy resume". To check the status of the cancellation, run "sf project deploy report". |

## Examples for project deploy cancel

Cancel a deploy operation using a job ID:

```shell
sf project deploy cancel --job-id 0Af0x000017yLUFCA2
```

Cancel the most recent deploy operation:

```shell
sf project deploy cancel --use-most-recent
```
<!-- prettier-ignore-end -->
