Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ New versions are not created when you make changes to [resources connected to yo

See examples of creating a Worker, Versions, and Deployments directly with the API, library SDKs, and Terraform in [Infrastructure as Code](/workers/platform/infrastructure-as-code/).

### Delete a version

To delete a version that is not currently deployed, use the [`wrangler versions delete`](/workers/wrangler/commands/#versions-delete) command:

```sh
npx wrangler versions delete <VERSION_ID> --name <WORKER_NAME>
```

You will be prompted to confirm the deletion. Use `--yes` to skip the confirmation prompt in CI environments.

:::note
You cannot delete a version that is actively serving traffic. Remove the version from the active deployment first.
:::

### View versions and deployments

#### Via Wrangler
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/workers/wrangler/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
✓ Select an account: › My account
| Name | ID | StoreID | Comment | Scopes | Status | Created | Modified |
|-----------------------------|-------------------------------------|-------------------------------------|---------|---------|---------|------------------------|------------------------|
| ServiceA_key-1 | 13bc7498c6374a4e9d13be091c3c65f1 | 8f7a1cdced6342c18d223ece462fd88d | | workers | active | 4/9/2025, 10:06:01 PM | 4/15/2025, 09:13:05 AM |

Check warning on line 499 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

Check warning on line 499 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
```

<WranglerCommand command="secrets-store secret delete" headingLevel={3} />
Expand Down Expand Up @@ -550,7 +550,7 @@
┌─────────┬──────────────────────────────────┬──────────────────────────────────┬──────────────────────┬──────────────────────┐
│ Name │ ID │ AccountID │ Created │ Modified │
├─────────┼──────────────────────────────────┼──────────────────────────────────┼──────────────────────┼──────────────────────┤
│ default │ 8876bad33f164462bf0743fe8adf98f4 │ REDACTED │ 4/9/2025, 1:11:48 PM │ 4/9/2025, 1:11:48 PM │

Check warning on line 553 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

Check warning on line 553 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
└─────────┴──────────────────────────────────┴──────────────────────────────────┴──────────────────────┴──────────────────────┘
```

Expand Down Expand Up @@ -729,6 +729,12 @@

<WranglerCommand command="versions view" headingLevel={3} />

<WranglerCommand
command="versions delete"
description="Delete a specific [version](/workers/configuration/versions-and-deployments/#versions) of your Worker. A version can only be deleted if it is not actively deployed."
headingLevel={3}
/>

<WranglerCommand command="versions secret put" headingLevel={3} />

<WranglerCommand command="versions secret delete" headingLevel={3} />
Expand Down Expand Up @@ -818,7 +824,7 @@
Success! Uploaded mTLS Certificate my-origin-cert
ID: 99f5fef1-6cc1-46b8-bd79-44a0d5082b8d
Issuer: CN=my-secured-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=California,C=US
Expires: 1/01/2025

Check warning on line 827 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
```

You can then add this certificate as a [binding](/workers/runtime-apis/bindings/) in your [Wrangler configuration file](/workers/wrangler/configuration/):
Expand Down Expand Up @@ -847,13 +853,13 @@
ID: 99f5fef1-6cc1-46b8-bd79-44a0d5082b8d
Name: my-origin-cert
Issuer: CN=my-secured-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=California,C=US
Created on: 1/01/2023

Check warning on line 856 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
Expires: 1/01/2025

Check warning on line 857 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

ID: c5d004d1-8312-402c-b8ed-6194328d5cbe
Issuer: CN=another-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=California,C=US
Created on: 1/01/2023

Check warning on line 861 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
Expires: 1/01/2025

Check warning on line 862 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
```

<WranglerCommand command="mtls-certificate delete" headingLevel={3} />
Expand Down Expand Up @@ -892,7 +898,7 @@
Success! Uploaded mTLS Certificate my-origin-cert
ID: 99f5fef1-6cc1-46b8-bd79-44a0d5082b8d
Issuer: CN=my-secured-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=California,C=US
Expires: 1/01/2025

Check warning on line 901 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
```

Note that the certificate and private keys must be in separate (typically `.pem`) files when uploading.
Expand Down
Loading