Moving from one directory to another#

If you simply copy the Anaconda or Miniconda files to a new directory, your installation will not work.

To move your Anaconda or Miniconda installation from one directory to another:

  1. (Optional) Back up any environments you wish to retain by exporting them to .yaml files.

    # Replace <ENV-NAME> with the name of the environment you want exported
    # Replace <FILE-NAME> with a descriptive name
    conda activate <ENV-NAME>
    conda env export > <FILE-NAME>.yml
    

    For more information on exporting and sharing environments, see Sharing an environment in the conda documentation.

  2. Uninstall.

    Note

    The uninstall instructions will also work for Miniconda. Replace anaconda with miniconda for all uninstall instructions.

  3. Go to the new directory and install it there, following the Anaconda or Miniconda installation instructions.

  4. (Optional) Restore any exported environments using the following command:

    # Replace <FILE-NAME> with the name of your environment file
    # You can only create one environment at a time
    conda env create -f environment.yml
    

    For more information on creating environments from .yml files, see Creating an environment from an environment.yml file in the conda documentation.