Actions86
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Environment Actions
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Setting Actions
- Stack Actions
- System Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Volume → Delete
AI-generatedOverview
This node operation deletes a Docker volume in a specified environment using the Portainer API. It is useful for managing Docker volumes by removing those that are no longer needed, helping to free up storage and maintain a clean Docker environment. For example, it can be used to delete a volume named 'my_volume' in environment ID '1'.
Use Case Examples
- Delete a Docker volume named 'my_volume' in environment ID '1' to free up disk space.
- Force delete a volume even if it is currently in use.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the environment/endpoint in Portainer where the volume exists. |
| Volume Name | The name of the Docker volume to delete. |
| Force Delete | Whether to force deletion even if the volume is currently in use. |
Output
JSON
body- Response body from the Portainer API after attempting to delete the volume.
Dependencies
- Portainer API with an API key credential for authentication
Troubleshooting
- Ensure the Environment ID is correct and the environment is accessible.
- Verify the volume name exists in the specified environment.
- If force delete is false and the volume is in use, deletion will fail; consider enabling force delete if appropriate.
- Check API key permissions to ensure the user has rights to delete volumes.
Links
- Portainer API - Volumes - Official Portainer API documentation for managing Docker volumes, including deletion.