Command-line
When interacting with resources in an OpenStack environment, it is generally best practice to use the ID
of a resource rather than its name.
First, view the available images to your currently authenticated user:
[wflintstone@login1(demo) ~]$ openstack image list
+--------------------------------------+------------------+-------------+------------------+------------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+------------------+-------------+------------------+------------+--------+
| ee163441-61b7-42fe-b06c-81e603c2e459 | centos.6.7-cloud | qcow2 | bare | 1127219200 | active |
| 43755176-d799-43e7-b3b6-b5486af087ac | centos.7.1-cloud | qcow2 | bare | 859111424 | active |
| c63abffb-1828-41fe-ae52-0f106b2c1dc9 | Cirros 0.3.4 | qcow2 | bare | 13287936 | active |
| e53b8e97-893c-4357-aca8-098731973eb2 | clusterware-el6 | qcow2 | bare | 661913600 | active |
+--------------------------------------+------------------+-------------+------------------+------------+--------+
To delete the clusterware-el6
image from the Glance image database - select its ID
or save as a variable, e.g.:
[wflintstone@login1(demo) ~]$ IMAGETODEL="e53b8e97-893c-4357-aca8-098731973eb2"
To delete the image from the Glance database:
[wflintstone@login1(demo) ~]$ openstack image delete $IMAGETODEL