# Troubleshoot issues

This section provides information to help you troubleshoot and resolve or work around common issues that are related to the following tasks:

• creating, building, or deploying canisters

• using the dfx command-line interface

• running the local canister execution environment

## Migrating an existing project​

Currently, there is no automatic migration or backward compatibility for any projects that you might have created using previous versions of the dfx command-line interface. After upgrading to the latest version, you might see error or failure messages if you attempt to build or install a project created with a previous version of the dfx command-line interface.

In many cases, however, you can continue to work with projects from a previous release by manually changing the dfx setting in the dfx.json configuration file, then rebuilding the project to be compatible with the version of the dfx command-line interface you have currently installed.

For example, if you have a project that was created with dfx version 0.8.0, open the dfx.json file in a text editor and change the dfx setting to the latest version or remove the section entirely.

## Restarting the local canister execution environment​

In some cases, starting the local canister execution environment fails due to stale state. If you encounter issues when running dfx start to start the local canister execution environment:

1. In the terminal that displays the IC emulation the execution environment uses, press Control-C to interrupt the local canister execution environment process.

2. Stop the local canister execution environment by running the following command:

dfx stop
3. Restart the local canister execution environment in a clean state by running the following command:

dfx start --clean

The --clean option removes checkpoints and stale state information from your project’s cache so that you can restart the local canister execution environment and web server processes in a clean state.

Keep in mind, however, that if you reset the state information by running dfx start --clean, your existing canisters are also removed.

After running dfx start --clean, recreate your canisters by running the following commands:

dfx canister create --alldfx builddfx canister install --all

## Removing the canisters directory​

If you run into problems building or deploying canisters after successfully connecting to the IC and registering canister identifiers, you should remove the canisters directory before attempting to rebuild or redeploy the canisters.

You can remove the canisters directory for a project by running the following command in the project’s root directory:

rm -rf ./.dfx/* canisters/*

## Reinstalling dfx​

Many of the bugs you might encounter can be addressed by uninstalling and reinstalling the dfx command-line interface. Here are a few ways to reinstall dfx.

If you only have one version of dfx installed in your development environment, you can usually run the following command to uninstall and reinstall the latest version of dfx: