5

Is it possible to delete an asset from mainnet? I just created a duplicate asset and want to delete the old one.

2 Answers 2

6

Disclaimer: Deleting assets can be dangerous since they may hold real value. Once they are deleted it may be impossible to get them back. Please be careful when deleting assets and only do so at your own risk.


In order to delete the asset you will need to remove the asset from the system altogether, i.e. you will need to remove all tokens and trustlines. You will need to control all the account holders to achieve this.

Note: a token is an instance of an asset; this is similar to the relationship that an object has to a class in object-oriented programming.


To remove the tokens send them back to the issuer account using a payment operation. This will remove these tokens from the system.

To remove the trustlines you need to set the trust limit for the asset to 0 on all accounts that currently trust this asset. This can be achieved using the change trust operation.

Once these two steps are completed your asset will be removed from the system.

Note: you can only remove a trustline on an account that has a 0 balance for that asset.


You can view your asset and the total number of account holders using the All Assets endpoint in Horizon. The num_accounts and amount field should be 0 to indicate that no account is holding the asset.

Note: your asset will always show up in this endpoint and cannot currently be removed.

1

Yes, you can Move all asset to another account, and remove the trust line of old asset from Dist account

Set Trust Limit to 0 to remove the trust line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.