If you need to remove files, there are two options:

  1. Remove them through the user interface

  2. Remove them through the API

We'll walk through both of those options here.

Remove Through User Interface

Log into your Pinata account here. Once logged in, you should automatically be taken to the page with all of your files. If you click the "More" button to the right of a file, you will see the option to remove the file:

Click "Remove Pin" and the file will be removed. We will still have a metadata record about the file in our database so that you can refer back to files that have been removed (unpinned). However, you will not be able to access the file once our IPFS nodes have run garbage collection. Read more about unpinned files on IPFS here.

At this time, we do not have a bulk option for unpinning files. We recommend using the API for this if possible.

Remove Through The API

If you are technical and can work with code, you may want to use our API to remove your files. This is also a good solution for removing files in bulk. First, we'll cover removing a file individually, and then we will talk about how to do this in bulk.

Removing an individual file is as simple as knowing the IPFS CID for the file. Here is the documentation for removing a file through the API:

https://docs.pinata.cloud/api-pinning/unpin

If you would like to remove files in bulk, you will need to take two steps.

  1. First, you'll need to query the pins you want removed based on some identifying criteria.

  2. Next, you will need to loop through those files and unpin each one individually.

Querying for pins means using the pinList endpoint. That is documented here:

https://docs.pinata.cloud/data/query-pins

When you have the list of pins you'd like to unpin, you can loop through them and call the unpin endpoint. Please keep in mind that Pinata's API is rate-limited. You will need to add a half-second to full-second delay between requests.

Did this answer your question?