When I retrieve an existing package from my Partial Sandbox on top of an existing Git directory where I have my code using the sfdx:mdapi:retrieve command, and then I convert this file tree to sfdx structure using the force:mdapi:convert command, I get duplicates of all the files on my local machine. The duplicate files are labeled like:


Looking at the mdapi commands here https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_mdapi.htm, I couldn't find any command to ignore duplicates.

Has anybody found a solution to this or have they made their own workaround?

2 Answers 2


Although I could not find any documentation for ignoring the duplicate files on retrieval, I work-around this by executing this command after every force:mdapi:retrieve:

find . -name "*.dup" -delete


Another alternative is to purge your existing meta-data directory (ie force-app) and build a fresh directory (ie force-app) without dupes with force:mdapi:convert.

But of course this is a workaround.

You must log in to answer this question.

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