# Directly Remove Approval on ERC721

**URL:** <https://forum.openzeppelin.com/t/directly-remove-approval-on-erc721/36273>\
**Category:** Smart Contracts\
**Tags:** erc721\
**Created:** [May 17, 2023, 2:43pm UTC](https://forum.openzeppelin.com/t/directly-remove-approval-on-erc721/36273 "2023-05-17T14:43:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EvanPiro](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/evanpiro/32/17173_2.png) [@EvanPiro](https://forum.openzeppelin.com/u/EvanPiro)\
**Post date:** [May 17, 2023, 2:43pm UTC](https://forum.openzeppelin.com/t/directly-remove-approval-on-erc721/36273/1 "2023-05-17T14:43:38Z")

</div>

I'm trying to remove an approval on a ERC721 price listing when a user removes their listing from a selling contract. I see that the ERC721 contract explicitly calls `delete _tokenApprovals[tokenId]` on token transfers, which I'm looking to do in my `removeListing` function but I can't access `_tokenApprovals` directly because it's private. Are there any suggestion about how to delete the approval as an extending contract?

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [May 17, 2023, 5:00pm UTC](https://forum.openzeppelin.com/t/directly-remove-approval-on-erc721/36273/2 "2023-05-17T17:00:02Z")

</div>

You can mimic `delete _tokenApprovals[tokenId]` by calling `_approve(address(0), tokenId)`.
