Package Copy

We provide two ways to copy a package from one repository to another:

  • Copy via the API using tools/integrations (such as the Cloudsmith CLI)
  • Copy via the Website UI.

Copy via the Cloudsmith CLI

Identify a Package

To copy a package using the Cloudsmith CLI, you first need to identify the package. See Package Identification for full instructions on identifying packages.

Copy a Package

Once you have identified the package, you use the cloudsmith copy command to copy it:


For example:

cloudsmith copy demo/examples-repo/IGgZrwGFAkyU examples-repo-public

In the above example, we identified that the package we wished to copy had the Unique ID "IGgZrwGFAkyU", and we copied it from the source repository "examples-repo" to the destination repository "examples-repo-public":


cloudsmith copy CLI example

Advanced Example

The example below would move all packages defined by the -q query from YOUR-ACCOUNT/YOUR-REPO to YOUR-DEST-REPO (note that the destination is NOT qualified by a YOUR-ACCOUNT namespace - This is because you can only copy/move packages from repositories in the same account, and not across accounts yet).

cloudsmith ls pkg OWNER/SOURCE_REPO -q 'YOUR-QUERY'/
-F json | jq '.data[] | .namespace + "/" + .repository + "/" + .slug' -r / 
| xargs -Ipackage cloudsmith copy package DESTINATION_REPO

for the -q query you can use any terms that you would use when searching for a package (see Search / Filter Packages for full details). For example:

-q 'format:maven AND name:cloudsmith-api AND version:^0.21'

This query would target all Maven packages named cloudsmith-api with version 0.21.*

You can remove the query to target all packages. The only downside to this approach is that it might require multiple invocations if you have more than the page size limit.

Copy via the Website UI

You can copy a package using the Website UI:

  • Via the repository packages list
  • Via the package detail page

Copy via Repository Packages List

To copy a package via the Repository packages list click the orange "Tool" button, then click "Copy"


copy package buttons on repository packages list

Copy via Package Details page

To copy a package via the package details page, click the blue "copy" button on the right of the package name:


copy package button on package details page

After clicking a "copy" button you will be presented with the Copy Package form. Select the destination repository from the drop-down menu and click "Copy" to complete the package copy:


Copy Package Form

You will then get an on-screen message confirming that the package copy was successful.

Bulk Package Copy

To copy more than one package to another repository, use the checkboxes beside the package names and then click the blue "copy package" button that appears at the top of the package list:


Bulk Package Copy


If you have selected a checkbox beside a package name, then package operations under the orange 'tool' button will be disabled as you are now in bulk operation mode.

Cloudsmith is the new standard in Package / Artifact Management and Software Distribution

With support for all major package formats, you can trust us to manage your software supply chain.

Start My Free Trial Now
Cookie Declaration (Manage Cookies)