ssh_docker_rm

Remove Docker containers via SSH with optional force-kill.

6|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/Nightreaver/python-ssh-mcp --skill ssh-docker-rm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssh_docker_rm
Source: https://github.com/Nightreaver/python-ssh-mcp/tree/main/skills/ssh-docker-rm
Command: npx skills add https://github.com/Nightreaver/python-ssh-mcp --skill ssh-docker-rm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides an efficient way to remove Docker containers, optionally force-kill if running, ensuring clean management of containerized applications.

Core Features & Use Cases

  • Container Removal: Safely remove containers with options for force-kill to handle running containers.
  • Selective Removal: Target specific containers using alias and container name for granular control.
  • Use Case: When a container needs to be decommissioned after use, or an error in a running container must be terminated quickly, this Skill provides the necessary commands.

Quick Start

Use the ssh_docker_rm skill to remove a running container on 'docker1' named 'old-nginx'. Force removal is optional, so use force=True if necessary.

Frequently Asked Questions about ssh_docker_rm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove a running Docker container via SSH?

To remove a running Docker container via SSH, execute the docker rm command with the force-kill flag. This terminates and removes the container in one step for operational maintenance tasks.

What is the best way to selectively remove Docker containers by name?

Selective Docker container removal targets specific instances using an alias and container name. This provides granular control to decommission individual containers without affecting others in the environment.

Do I need to stop a container before removing it from a remote host?

You do not need to stop a container before removing it from a remote host. Optional force-kill functionality handles running containers directly during the docker rm execution over SSH.

Can I use SSH to manage Docker container cleanup on remote servers?

You can use SSH to manage Docker container cleanup on remote servers by running docker rm commands. This handles both stopped containers and running instances requiring force-kill.

Why does docker rm fail to remove a running container?

The docker rm command fails on running containers without the force flag. You must enable force-kill to terminate and remove running instances during remote SSH maintenance operations.