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:
Running containers are stopped first
Database entries are cleaned up
Files/images are properly deleted
No orphaned resources remain
Policy Mode
Remove a policy model from the system:
maple remove policy NAME [OPTIONS]
Arguments
NAMEPolicy name (e.g.,
openvla:7b)
Options
--keep-weightsKeep model weights on disk (only remove image and policy from database)
--port INTEGERDaemon 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
NAMEEnvironment name (e.g.,
libero,simplerenv)
Options
--port INTEGERDaemon 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