Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/psviderski/uncloud/llms.txt

Use this file to discover all available pages before exploring further.

Remove one or more services from the cluster. This stops and removes all containers of the specified service(s) across all machines.

Usage

uc rm SERVICE [SERVICE...]
Aliases: uc remove, uc delete, uc service rm, uc service remove, uc service delete

Arguments

SERVICE
string[]
required
Names or IDs of services to remove. Can specify multiple services.

Examples

Remove a service

uc rm web

Remove multiple services

uc rm web api worker

What Gets Removed

When you remove a service:
  • Containers - All service containers are stopped and removed
  • Service configuration - Service metadata is removed
  • Anonymous volumes - Automatically created volumes from Dockerfile VOLUME directives

What’s Preserved

These are NOT removed:
  • Named volumes - Must be removed separately with uc volume rm
  • Images - Container images remain on machines
  • Networks - Cluster network configuration is unchanged

Output

Removing service web
✓ Removed 3 containers

Volumes

Named Volumes

Named volumes used by the service are preserved:
uc rm db
# postgres-data volume still exists
Remove volumes separately:
uc volume rm postgres-data

Anonymous Volumes

Anonymous volumes (created automatically from VOLUME directives in Dockerfiles) are removed with their containers:
# In Dockerfile
VOLUME /tmp
This anonymous volume is removed with the container.

Removing vs Stopping

  • uc rm SERVICE - Permanently removes the service and containers
  • uc stop SERVICE - Temporarily stops containers, preserves everything
Use uc stop if you might want to start the service again:
uc stop web
# Later...
uc start web
Use uc rm when you’re done with the service:
uc rm web
# Service is completely gone

Redeploying After Removal

To redeploy a removed service:
uc rm web
uc deploy  # or uc run
This creates fresh containers with the configuration from your Compose file or run command.

Use Cases

Clean Up Old Services

Remove services you no longer need:
uc rm old-api legacy-worker

Redeploy from Scratch

Remove and redeploy to ensure clean state:
uc rm web
uc deploy

Free Up Resources

Remove services to free up CPU and memory:
uc rm dev-api staging-db test-worker

Important Notes

Data Loss Warning

Removing a service deletes containers and their data. Make sure important data is in volumes:
# Safe - data in named volume
uc run postgres:16 -v postgres-data:/var/lib/postgresql/data
uc rm postgres  # Container gone, but postgres-data volume remains

# Unsafe - data in container
uc run postgres:16  # No volume mount
uc rm postgres  # Container AND data gone

Cannot Undo

Once removed, you cannot bring the service back with uc start. You must redeploy:
uc rm web
uc start web  # Error: service not found
uc deploy     # Must redeploy

Build docs developers (and LLMs) love