I got an unmanaged-package installed in my org, I wish to export the package to my other org, how can I download the package or export it to other org?

1 Answer 1


the solution I propose uses the Salesforce CLI (find it here: https://developer.salesforce.com/tools/sfdxcli). The reason for this is, that the cli enables you to interact with the org from your local pc. Which includes the most important points here, meaning the retrieval and deployment of your desired metadata.

There are five basic steps that you have to complete in order to transfer the unmanaged package.

1 - Get a package.xml file which lists all of the components related to your desired package. Here's a tool which can generate a complete package.xml of all components in your org: https://packagebuilder.herokuapp.com/

2 - Open a command line in the same folder where your pacakge.xml lies and authentificate with to your org, where you want to export the package:

sfdx force:auth:web:login

In case this is a sandbox use:

sfdx force:auth:web:login -r https://test.salesforce.com

3 - Retrieve the metadata by following command:

sfdx force:mdapi:retrieve -u <UsernameSource> -r retrievepath/ -k ./package.xml -w  30

4 - You now should find a zipfile: retrievepath/unpackaged.zip. Unzip it and authentificate to the org you want to deploy to.

5 - Deploy the target org with the retrieved metadata:

sfdx force:mdapi:deploy -u <UsernameTarget> -d retrievepath/unpackaged/ -w  30

I don't know any "easier" way to this, but in the past this worked pretty fine for me.

  • Hi,thanks for the reply, I am stuck at the first step, when I use the tool to get all the components of my org, it show me "500 - Website Error" and "There appears to have been an error. The administrator has been notified.", do you know how to solve this error? Sep 28, 2019 at 1:18
  • If I had to guess, I'd say it's some kind of permisison issue, that your user is not able to do that. Or you selected the wrong type - production/sandbox
    – Hyperzwerg
    Sep 30, 2019 at 11:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .