remove

Remove policies and environments from the system.

Synopsis

maple remove policy NAME [OPTIONS]
maple remove env NAME [OPTIONS]

Description

The remove command group provides clean resource deletion functionality:

  • Remove policies: Delete policy models, weights, and stop containers

  • Remove environments: Delete environments, Docker images, and stop containers

Unlike manually deleting files, remove ensures:

  1. Running containers are stopped first

  2. Database entries are cleaned up

  3. Files/images are properly deleted

  4. No orphaned resources remain

Policy Mode

Remove a policy model from the system:

maple remove policy NAME [OPTIONS]

Arguments

NAME

Policy name (e.g., openvla:7b)

Options

--keep-weights

Keep model weights on disk (only remove image and policy from database)

--port INTEGER

Daemon port to connect to (default: from config, typically 8000)

Examples

# Remove with confirmation
maple remove policy openvla:7b

# Remove but keep weights on disk
maple remove policy openvla:7b --keep-weights

Output

The following will be removed:
  Policy: openvla:7b
  Database entry: Yes
  Weights path: /home/user/.maple/models/openvla/7b

Stopping policy container: openvla-7b-abc123
✓ Removed from database
✓ Deleted weights from /home/user/.maple/models/openvla/7b

Environment Mode

Remove an environment from the system:

maple remove env NAME [OPTIONS]

Arguments

NAME

Environment name (e.g., libero, simplerenv)

Options

--port INTEGER

Daemon port to connect to (default: from config, typically 8000)

Examples

# Remove with confirmation
maple remove env libero

Output

The following will be removed:
  Environment: libero
  Database entry: Yes
  Docker image: maple/libero:latest

Stopping environment container: libero-x1y2z3w4
✓ Removed from database
✓ Deleted Docker image

Notes

Safety Features

  • Container stopping: Running containers are automatically stopped before removal

Error Handling

Non-existent resources:

Error: Policy openvla:7b not found in database

Docker errors:

Warning: Could not check for running containers: ...
✓ Removed from database
Error removing Docker image: Cannot connect to Docker daemon

Permission errors:

✓ Removed from database
Error deleting weights: Permission denied

See Also

  • sync - Sync database with manually deleted resources

  • pull - Download policies and environments

  • serve - Start containers

  • list - List available resources