https://dagster.io/ logo
#ask-ai
Title
# ask-ai
t

Tara Larrue

02/12/2024, 5:41 PM
how do I start a clean local instance (with wiped assets) before launching the webserver again?
s

Scout

02/12/2024, 5:41 PM
To start a clean local instance with wiped assets before launching the webserver, you can follow these steps: 1. Set the
DAGSTER_HOME
Environment Variable
: Ensure that the
DAGSTER_HOME
environment variable is set to a directory where you want Dagster to store its instance configuration and data. If
DAGSTER_HOME
is not set, Dagster will use a temporary directory for storage that is cleaned up when the process exits. 2. Create or Clear the Instance Directory: If you already have a
DAGSTER_HOME
directory and you want to start fresh, you can manually delete the contents of this directory. Be cautious with this step, as it will remove all existing data, including run history and logs. 3. Wipe Assets: Use the
dagster asset wipe
CLI command to clear the asset index. This will not remove run logs or event logs, but it will clear the asset index. 4. Launch the Webserver: After you have set
DAGSTER_HOME
and cleared the instance directory or wiped the assets, you can launch the webserver using the
dagit
command. Here's a summary of the commands you might use in your terminal:
Copy code
bash # Set the DAGSTER_HOME environment variable to a known location export DAGSTER_HOME=/path/to/your/dagster_home  # Clear the contents of the DAGSTER_HOME directory (be careful with this command) rm -rf $DAGSTER_HOME/*  # Wipe assets using the Dagster CLI (this clears the asset index) dagster asset wipe  # Launch the webserver with dagit dagit
Please note that wiping assets and clearing the instance directory will remove data permanently. Make sure you have backups or do not need the data before performing these actions. If you need more detailed instructions or have specific requirements for your local development setup, you should refer to the [Dagster instance documentation](https://docs.dagster.io/deployment/dagster-instance) for the full list of options and configurations available for managing your Dagster instance.