---
title: "Remove Container"
method: POST
path: "/docker/remove-container/{container_name}"
tags: ["Docker"]
---

# Remove Container

`POST /docker/remove-container/{container_name}`

Remove a Hummingbot container and optionally archive its bot data.

NOTE: This endpoint only works with Hummingbot containers (names starting with 'hummingbot-')
as it archives bot-specific data from the bots/instances directory.

Args:
    container_name: Name of the Hummingbot container to remove
    archive_locally: Whether to archive data locally (default: True)
    s3_bucket: S3 bucket name for cloud archiving (optional)
    docker_service: Docker service dependency
    bot_archiver: Bot archiver service dependency
    
Returns:
    Response from container removal operation
    
Raises:
    HTTPException: 400 if container is not a Hummingbot container
    HTTPException: 500 if archiving fails

## Path parameters

- `container_name` string, required

## Query parameters

- `archive_locally` boolean
- `s3_bucket` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-04-08** `92703f48a69e` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-01-18** `2ad95b6a84b2` — 1 breaking
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
- **2026-01-18** `576ec8539f76` — 1 breaking
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
- **2025-12-20** `1005bcd47280` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hummingbot/apis/hummingbot-api/changes/docker/remove-container/:container_name/post.md)

---

[API](https://skmtc.dev/hummingbot/apis/hummingbot-api.md) · [All operations](https://skmtc.dev/hummingbot/apis/hummingbot-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hummingbot/hummingbot-api/revisions/5347fe79537f/schema)
