Command referenceconda create --clone
conda create --clone command (Linux & Windows / Conda)
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 / option | Meaning |
|---|---|
| --clone SOURCE | Name or prefix of the environment to copy. |
| -n, --name | Name of the new environment. |
| -p, --prefix | Prefix of the new environment. |
| -y, --yes | Skip 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.
Related commands
- conda createCreate a new isolated Conda environment with an optional Python version and starter packages.
- conda env exportExport the active (or named) environment to a YAML or explicit package lock for sharing.
- conda env createCreate an environment from an environment.yml (or similar) specification file.
- conda renameRename an existing Conda environment without recreating it from scratch.
- conda activateActivate a named or path-based Conda environment in the current shell session.
- conda installInstall packages into the active or named Conda environment from configured channels.
- conda listList packages installed in the active or named Conda environment.
- conda env listList all Conda environments and mark the currently active one.
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.