# Delete script version

> Delete a single version of a Cloud Code script.

Delete a single published version of a Cloud Code script, leaving the script and its other versions
in place.

To delete the whole script, use [delete](delete) instead.

## Command

Authentication Required: `Yes`

```text
ugs cloud-code scripts delete-version <script-name> <version> [options]
```

## Arguments

`<script-name>` Name of the target script

`<version>` The version to delete, as listed by [`scripts get --versions`](get)

## Options

|             | Alias                  | Description                         |
| ----------- | ---------------------- | ----------------------------------- |
| project-id  | -p, --project-id       | The Unity cloud project ID.         |
| environment | -e, --environment-name | The services environment name.      |
| help        | -?, -h, --help         | Display help and usage information. |
| quiet       | -q, --quiet            | Reduce logging to a minimum.        |
| json        | -j, --json             | Use JSON as the output format.      |

## Notes

The version must be a version number. `latest` is not accepted: a delete never resolves a selector
on your behalf.

Two versions cannot be deleted:

* the active version, which is the one [publish](publish) most recently promoted
* any version assigned to a release

Both are refused with a conflict. To remove the active version, publish another version first.

The working copy is not a published version and cannot be deleted with this command.
