> Documentation index for agents: /hcp/3.3/en/llms.txt

# Delete an image

Delete an OS image when you no longer need it, and also an import or upload row with the **Failure** status. Center deletes the copies of the image from all pools of the cluster and the image row from the catalog. The action cannot be undone: you can restore the image only with a new import or upload.

## Before you begin

- You need the **Cluster master** role — for any image — or the **VDC admin** role — for an image of your VDC (virtual data center). A **VDC admin** cannot delete a shared image.
- There are no VMs created from the image and no clones of the image on the nodes. Otherwise Center rejects the deletion and shows the dependencies that block it — [If the image has dependencies](#dependencies).
- No import or upload is running for the image. Cancel a running import first — [Cancel the import](/hcp/3.3/en/images/import-image/index.md#cancel-import); do the same with an upload as a file until the file has been received: [Upload an image as a file](/hcp/3.3/en/images/upload-image-file/index.md).
- The cluster nodes are available: the copy on an unavailable node is not deleted, and the deletion is partial.

## Delete the image

1. In the left menu, select **Provider Data Center** → **Image library**. The **Images** tab opens.
2. In the image row, select **Actions** → **Delete**. Or click the image row and click **Delete image** in the image panel. The **Delete image?** window opens with the text **Image \<name> will be deleted from every pool. This action is irreversible.**.
3. Click **Delete**.

Before the deletion, Center checks the image dependencies again. While the image is being deleted, its status is **Deleting**.

If the **Actions** menu has no **Delete** item, you do not have the rights to delete this image, or an import or upload is running for it.

## Check the result

The web interface shows the notification **Image \<name> deleted**, the window closes, and the image row disappears from the catalog.

## If the image has dependencies

If VMs have been created from the image or the nodes have clones of the image copies, Center does not delete the image and makes no changes on the nodes. The window changes to **The image cannot be deleted** with the hint **Check the image dependencies**:

- **Virtual machines from this image** — the name and the `vm_id` of each VM; the name leads to the VM page if you have access to it.
- **Clones on nodes** — the node, the pool and the number of clones on it, for example **Clones: 2**.
- **\<N> nodes skipped** at the bottom of the window — these nodes did not respond, and the list may be incomplete.

Delete the VMs from the list — [Delete a VM](/hcp/3.3/en/vms/delete-vm/index.md), — wait until the skipped nodes become available again, and delete the image again. The **Back to image** button closes the window.

## If the image was deleted partially

If the copy could not be deleted on all nodes, Center deletes the copies on the nodes where this is possible and reports the result. The web interface shows the notification **Image \<name> was removed partially**, and the window changes to **The image has been removed partially** with groups of nodes:

- **Removed from** — the nodes from which the copy has been deleted;
- **Failed on** — the nodes where the deletion failed, with the reason;
- **Skipped** — the nodes that were unavailable: **the node was unavailable**.

The image stays in the catalog with the **Partially available** status. The pools from which the copy has been deleted are marked **Removed** in **Pool layout**, and VMs are no longer created from the image on these pools.

Fix the cause of the error or wait until the nodes become available again, and click **Retry** — Center deletes the remaining copies. You can also repeat the deletion later in the usual way.

## Troubleshooting

If Center has rejected the deletion, the web interface shows a notification, and the window stays open:

| Notification | What to do |
| - | - |
| **You do not have permission to remove this image** | The image belongs to another VDC or is shared. Ask a user with the **Cluster master** role to delete it |
| **The image is already being deleted** | Wait for the deletion to finish |
| **Image not found** | The image has already been deleted or is not visible to you. Refresh the page |
| **Cluster nodes could not be reached** | Check the state of the nodes and repeat the deletion |
| **Removal is unavailable: the audit log is not responding** | Center has not written the action to the security log and therefore has not performed it. Try again later |
| **The removal could not be completed, try again later** | Repeat the deletion later |

## Next

- [Import an image from a source](/hcp/3.3/en/images/import-image/index.md)
- [Delete a VM](/hcp/3.3/en/vms/delete-vm/index.md)
- [Image library](/hcp/3.3/en/images/index.md) — who owns an image and where its copies are.

API methods: `golden-image-clones`, `golden-image-remove` — in the [API reference](/hcp/3.3/en/api/methods/index.md).
