Deleting a Python package from a registry
You can delete a Python package from a Cloud Registry registry.
To delete a Python package, you need the cloud-registry.admin role or higher.
- In the management console
, select the folder where the registry is located. - Go to Cloud Registry.
- In the left-hand panel, select
Registries. - Select the registry you want to delete the package from.
- In the left-hand panel, select
Artifacts. - Click on the
artifact name. - Find the package version in the list.
- Click
next to the package and select Delete. - In the window that opens, click Delete.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
Note
You can find the artifact ID through the management console
-
Get a list of artifacts in the registry:
yc cloud-registry registry list-artifacts --id <registry_ID>Result:
+----------------------+-------------+--------+------+---------------------+ | ID | NAME | KIND | PATH | MODIFIED AT | +----------------------+-------------+--------+------+---------------------+ | cn172c0ldnh2******** | my-package1 | FOLDER | | 2026-04-13 14:53:52 | | cn1j1rh7k416******** | my-package2 | FOLDER | | 2026-04-13 14:53:53 | | cn1n0ufa7mcq******** | my-package3 | FOLDER | | 2026-04-13 14:53:54 | +----------------------+-------------+--------+------+---------------------+ -
Delete the artifact:
yc cloud-registry artifact delete --id <artifact_ID>Result:
done (1s) -
Make sure the artifact has been deleted:
yc cloud-registry artifact get --id <artifact_ID>
To delete a Python package, use the delete REST API method for the Artifact resource or the ArtifactService/Delete gRPC API call.
Automatic deletion of old versions
To automatically delete old package versions, use lifecycle policies. For more information, see Configuring lifecycle policies.
Example of a policy for Python packages:
[
{
"path_prefix": ".*",
"delete": {
"type": "SOFT_DELETE",
"cooldown_period_days": 10,
"version_condition": {
"versions_count_greater_than": 5
}
}
}
]