Skip to main content

One post tagged with "Destructive Changes"

Deleting Salesforce metadata via destructive deploys

View All Tags

Deploy Destructive Changes in Salesforce Without Hand-Writing destructiveChanges.xml

· 10 min read
Alina Hubaidullina
Salesforce Consultant

You need to delete a field, an object, or a class from a target org — and your SFDX deploy quietly leaves it in place. A source deploy (sf project deploy start --source-dir, formerly force:source:deploy --sourcepath) deploys the components it finds in your source directory. Removing something is a separate instruction the source format doesn't carry — the manual path is a hand-authored destructiveChanges.xml paired with an empty package.xml and a pre/post ordering flag. mtdt.io turns that into a checkbox: pick what to delete, get the manifest built for you, and choose before-or-after deploy ordering with one radio.