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
Stack → Delete
AI-generatedOverview
This node operation deletes a Docker Compose stack in Portainer. It is useful for managing and cleaning up stacks that are no longer needed in a Docker environment managed by Portainer. For example, if a user wants to remove a specific stack from their environment, they can use this operation to delete it by specifying the stack ID and environment ID.
Use Case Examples
- Deleting a stack by providing its stack ID and the environment ID where it is deployed.
- Force deleting a stack even if it is currently in use by setting the 'Force Delete' option to true.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the environment/endpoint in Portainer where the stack is deployed. This is required to specify the target environment for the stack deletion. |
| Stack ID | The ID of the stack to be deleted. This uniquely identifies the stack within the specified environment. |
| Force Delete | A boolean option to force the deletion of the stack even if the resource is currently in use. Defaults to false. |
Output
JSON
response- The response from the Portainer API after attempting to delete the stack, indicating success or failure.
Dependencies
- Requires Portainer API access with an API key credential.
Troubleshooting
- Ensure the Environment ID and Stack ID are correct and correspond to existing resources in Portainer.
- If deletion fails due to the stack being in use, try enabling the 'Force Delete' option.
- Check API key permissions to ensure the user has rights to delete stacks.
- Verify network connectivity to the Portainer API endpoint.
Links
- Portainer API - Delete Stack - Official Portainer API documentation for deleting a stack.