Skip to main content
Copy an existing model to a new name. This is useful for creating backups, renaming models, or creating variants.

Syntax

ollama cp SOURCE DESTINATION

Arguments

SOURCE
string
required
The name of the source model to copy
DESTINATION
string
required
The name for the copied model

Examples

Copy a model

ollama cp gemma3 my-gemma3
This creates a new model named my-gemma3 that is an exact copy of gemma3.

Create a backup before customization

ollama cp gemma3 gemma3-backup
ollama create gemma3 -f Modelfile

Rename a model

ollama cp old-name new-name
ollama rm old-name

How it works

The cp command creates a new model by copying all the layers and configuration from the source model. This operation:
  • Copies model manifests and configuration
  • References the same blob files (no duplication of model weights)
  • Creates an independent model that can be modified or deleted separately
  • Is fast because it doesn’t duplicate large model files

Exit codes

  • 0 - Model copied successfully
  • 1 - Copy failed (source model not found, destination already exists, or server error)

Notes

The copy operation uses references to the same underlying blobs, so it doesn’t duplicate storage space for the model weights.
If the destination model name already exists, the command will fail. Remove the existing model first with ollama rm if you want to replace it.

ollama create

Create custom models

ollama rm

Remove models

ollama list

List all models

ollama show

Show model information