deprovision
This guide shows you how to completely remove a Datafye Trading Environment from your local machine.
Prerequisites
Before you begin, ensure:
You have previously provisioned a local Trading Environment
Docker Desktop is running on your machine
Warning: Deprovisioning is irreversible. All deployment data will be permanently deleted, including configurations, databases, trading history, and downloaded data.
Important: Deprovisioning only removes the local Datafye infrastructure. It does not close positions or cancel orders with your broker. Ensure you have closed all positions and canceled all open orders before deprovisioning.
Deprovision Command
Use the following command to deprovision your local Trading Environment:
datafye trading local deprovisionConfirmation
The CLI will prompt you to confirm the deprovision operation:
WARNING: This will permanently delete your local Trading Environment and all data.
IMPORTANT: This does NOT close positions or cancel orders with your broker.
Ensure you have manually closed all positions before proceeding.
Are you sure you want to continue? (yes/no):Type yes to proceed with deprovisioning.
Skip confirmation:
Deprovision Process
When you deprovision the deployment, the CLI will:
Stop services - Gracefully stop all running Datafye services
Disconnect from broker - Close broker connections
Remove containers - Delete all Docker containers
Remove networks - Delete the Docker network
Remove volumes - Delete all data volumes (configuration, databases, trading history)
Remove images (optional) - Delete Docker images if no longer needed
Clean up state - Remove deployment metadata
Display status - Confirm successful deprovisioning
The deprovisioning process typically takes 1-2 minutes. Do not interrupt it.
After Deprovisioning
Once deprovisioning completes:
All Datafye containers are removed
All data and configuration are permanently deleted
Docker resources are freed
Your machine is clean for a new deployment if desired
Broker account remains unchanged:
Any positions you had remain open with your broker
Your broker account balance is unaffected
Trading history remains in your broker account
To create a new deployment: Run datafye trading local provision with your descriptor files.
Your local Trading Environment has been completely removed!
When to Deprovision
Deprovision your deployment when:
No longer needed - You're done with the deployment and won't use it again
Starting fresh - You want to recreate the deployment from scratch
Freeing disk space - You need to reclaim the storage used by containers and data
Troubleshooting - Resolving persistent issues by removing and re-provisioning
Changing scenarios - Switching between Data Cloud + Broker and Full Stack
Changing brokers - Switching to a different broker provider
Troubleshooting
Docker Not Running
If you see an error about Docker not being available:
Start Docker Desktop
The CLI needs Docker to remove containers
Retry the deprovision command
No Deployment Found
If you see an error that no local deployment exists:
The deployment may already be deprovisioned
Check for any remaining containers:
docker ps -a | grep datafyeManually clean up if needed:
docker rm -f $(docker ps -aq -f name=datafye)
Partial Deprovision
If deprovisioning fails partway through:
Review the error message
Retry the deprovision command
If issues persist, manually clean up:
Containers Won't Remove
If containers fail to remove:
Ensure all containers are stopped first
Use force flag:
datafye trading local deprovision --forceManually force-remove:
docker rm -f <container-id>
Open Positions Remain
After deprovisioning, if you still have open positions:
Log into your broker's platform directly (paper or live)
Close positions manually through the broker interface
The Datafye deployment is independent of your broker positions
Related Commands
Provision a Local Trading Environment - Create a new deployment
Start a Local Trading Environment - Start a stopped deployment
Stop a Local Trading Environment - Stop a running deployment
Last updated: 2025-10-22
Last updated

