Skip to main content

delete data-image

Overview#

To delete a data image you can use the delete command. You cannot delete data images that have data containers.

Command#

spawnctl delete data-image <ImageNames[:Tag]_Or_ImageIDs>

If you are an admin of your organisation, you can delete data-images within your organisation using the --org flag.

Examples#

Delete a data-image with id 10001:

spawnctl delete data-image 10001

Delete a data-image with name dev:

spawnctl delete data-image dev

Delete multiple data-images with ids 10001, 10002 and 10003:

spawnctl delete data-image 10001 10002 10003

Delete multiple data-images with names dev1, dev2:

spawnctl delete data-image dev1 dev2

Delete data-image with named dev and tag testing:

spawnctl delete data-image dev:testing

Delete a data-image with id 10001 that you do not own but is part of your organisation:

spawnctl delete data-image 10001 --org

Tutorial#

In this tutorial we will create a data image and delete it.

As a prerequisite you should've followed the instructions to install spawnctl

  1. Identify the data image you plan to delete.

    $ spawnctl get data-images
    NAME IMAGE ID ENGINE STATUS MESSAGE CREATED
    dev 10001 PostgreSQL 2 Created 2 minutes ago

    In this case we want to delete the data image 10001.

  2. Run the delete command to remove the data image.

    $ spawnctl delete data-image 10001
    Deleting image....
    10001
  3. You can verify the data image was deleted by running the following command.

    $ spawnctl get data-images
    No resources found.