# Delete module version

> Delete a single version of a Cloud Code module.

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

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

## Command

Authentication Required: `Yes`

```text
ugs cloud-code modules delete-version <module-name> <version> [options]
```

## Arguments

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

`<version>` The version to delete, as listed by [`modules 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 live version, which is the one the module currently serves
* any version assigned to a release

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

This command requires module versions to be enabled for the project. Without it a module has no
versions to name, and the request is refused.
