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

Deprovision Command

Use the following command to deprovision your local Trading Environment:

datafye trading local deprovision

Local deployments don't require a --name parameter since only one deployment is allowed per machine.

Confirmation

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:

  1. Stop services - Gracefully stop all running Datafye services

  2. Disconnect from broker - Close broker connections

  3. Remove containers - Delete all Docker containers

  4. Remove networks - Delete the Docker network

  5. Remove volumes - Delete all data volumes (configuration, databases, trading history)

  6. Remove images (optional) - Delete Docker images if no longer needed

  7. Clean up state - Remove deployment metadata

  8. Display status - Confirm successful deprovisioning

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.

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:

  1. Start Docker Desktop

  2. The CLI needs Docker to remove containers

  3. Retry the deprovision command

No Deployment Found

If you see an error that no local deployment exists:

  1. The deployment may already be deprovisioned

  2. Check for any remaining containers: docker ps -a | grep datafye

  3. Manually clean up if needed: docker rm -f $(docker ps -aq -f name=datafye)

Partial Deprovision

If deprovisioning fails partway through:

  1. Review the error message

  2. Retry the deprovision command

  3. If issues persist, manually clean up:

Containers Won't Remove

If containers fail to remove:

  1. Ensure all containers are stopped first

  2. Use force flag: datafye trading local deprovision --force

  3. Manually force-remove: docker rm -f <container-id>

Open Positions Remain

After deprovisioning, if you still have open positions:

  1. Log into your broker's platform directly (paper or live)

  2. Close positions manually through the broker interface

  3. The Datafye deployment is independent of your broker positions


Last updated: 2025-10-22

Last updated