TL;DR You can't and you shouldn't care.
This can be a bit off-topic, but IPFS is not an immutable ledger, not at all. When you publish via Remix, it at first tries with a local IPFS node, if it's not found it tries with Infura public node (https://ipfs.infura.io:5001/api/v0/add?pin=true
) and it asks to pin (to keep in cache) the content for some time.
It's up to the IPFS node (in this case the Infura node) to decide how long to keep the information available to other peers, usually, it gets deleted from cache (unpinned) if no peers request it after some time.
Because IPFS is a Content-Addressable Network - where the URIs to get a piece of information are based on the content of that information - if you don't share the resulting hash of the contract no peers will be able to ask Infura for that content, and it will get eventually deleted even from their cache.