I know that I could set source tracking to disabled when I create a sandbox or scratch org, but if I already have created sandbox or scratch org created with source tracking enabled and now I have some strange errors when I try to push or pull metadata. How can I get rid of these errors?

In the past, I was just deleting .sfdx/orgs folder with a

rm -rf .sf/orgs or rm -rf .sfdx/orgs command.

However, now when I try to execute this command, that doesn't help.

How can I resolve those strange errors?

1 Answer 1


So, instead of executing rm -rf .sf/orgs or rm -rf .sfdx/orgs command, we could just execute sf project delete tracking -p command, which would just delete local tracking files, which means everything should be deployed now, but it doesn't help me.

Another sf project reset tracking -p command would set local files to match the remote source tracking. So there would be no changes to deploy, but this doesn't help me either.

Actually what I need to do, is to reset remote tracking, for which we could use the following script:

for OUTPUT in $(sf data query -q 'select id from SourceMember' -t --json | jq '.result.records[].Id' -r)
    sf data delete record -t -s 'SourceMember' -i $OUTPUT
  • If you are answering your own question, may I suggest adding the "what I tried already, but doesn't work" to your original question instead? Commented Feb 19 at 13:43
  • yes, I added that - I tried to execute rm -rf .sf/orgs
    – Patlatus
    Commented Feb 19 at 13:56
  • I meant adding them to the original/question post (the part where you describe the issue and what didn't work), not to the answer post. Commented Feb 20 at 10:18
  • yes, so they are in the question post
    – Patlatus
    Commented Feb 20 at 10:25

You must log in to answer this question.

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