Skip to main content

Command referenceconda create --clone

conda create --clone command (Linux & Windows / Conda)

Linux & WindowsCondapackageintermediate

What it does

Duplicate an existing Conda environment into a new name or prefix. When people look up conda clone environment, they usually want safe flags, copyable examples, and how this Conda subcommand fits Anaconda or Miniconda workflows on Linux, Windows, and macOS. Syntax, options, and practical examples are below.

Duplicate an existing Conda environment into a new name or prefix.

Syntax

conda create --clone SOURCE [-n NEW | -p PATH]

Common options

Flag / optionMeaning
--clone SOURCEName or prefix of the environment to copy.
-n, --nameName of the new environment.
-p, --prefixPrefix of the new environment.
-y, --yesSkip confirmation.

Practical examples

Clone by name

conda create --clone ml -n ml-exp

Copies ml into a new ml-exp environment.

Clone to a path

conda create --clone base -p ./envs/sandbox

Creates a project-local copy based on base (use sparingly).

Experiment safely

conda create --clone web -n web-try -y

Lets you test upgrades without touching web.

Common mistakes

  • Cloning huge environments over a slow disk and assuming it is instant.
  • Cloning then upgrading both copies without documenting which is production.

FAQ

What does conda create --clone do in Conda?

Duplicate an existing Conda environment into a new name or prefix.

Does conda create --clone work on Windows and Linux?

Yes. Conda runs on Linux, Windows, and macOS; shell activation differs slightly after `conda init`, but the CLI flags are the same.

What is a practical conda create --clone example?

Try `conda create --clone ml -n ml-exp` — Copies ml into a new ml-exp environment.

Is mamba the same as conda create --clone?

Mamba is a faster drop-in solver for many Conda workflows. Prefer `mamba` only when it is installed; otherwise use the Conda commands on this page.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.