How to copy an Ollama model

Copying an Ollama model creates another local model name that points at the same underlying model content. It is useful before experimenting with a custom Modelfile, publishing under an account namespace, or preserving a known local tag.

The copy operation changes model metadata in the local model store, so use a clear destination name and verify it appears in the model list before relying on it in scripts.

Do not use copy as a backup for the actual model data. Use a data backup when the host or disk is changing.

Steps to copy an Ollama model:

  1. List the source model name exactly as Ollama knows it.
    $ ollama list
    NAME           ID              SIZE     MODIFIED
    gpt-oss:20b    17052f91a42e    13 GB    6 months ago
  2. Copy the model to the destination name.
    $ ollama cp gpt-oss:20b example/gpt-oss-test
  3. Verify that the destination name appears in the model list.
    $ ollama list
    NAME                    ID              SIZE     MODIFIED
    example/gpt-oss-test    17052f91a42e    13 GB    just now
    gpt-oss:20b             17052f91a42e    13 GB    6 months ago
  4. Inspect the copied model before using it in automation.
    $ ollama show example/gpt-oss-test
      Model
        architecture        gptoss
        parameters          20.9B
    ##### snipped #####
  5. Remove the copied name when it was only for testing.
    $ ollama rm example/gpt-oss-test
    deleted 'example/gpt-oss-test'