[SalesForce] Delete picklist inactive values using ANT

We need to delete inactive values from some of our picklist using ant and we are not able to do it.

We have tried with this 'destructivePackage.xml':

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>MiC_Log__c.Picklist_Test__c.Hola</members>
        <name>PicklistValue</name>
    </types>
    <version>43.0</version>
</Package>

It seems it is working to move active values to inactive values, but not to delete the inactive value.

Any solution?

Best Answer

Deleting picklist values operation is not supported by Salesforce METADATA API

This is because of when we delete any picklist value by UI we need to set replacement of that value in records i.e. Blank or Any other picklist value.

Reference - https://blog.jeffdouglas.com/2008/07/15/migrating-salesforcecom-configurations-with-the-metadata-api-forcecom-migration-tool/