Delete all issues in a project

How can I delete all issues in a project?

In UI I can only delete 25 issues at once, and I need to delete a big number of issues in my project.


1 Like

We don’t have a simple way to delete everything. Is there a reason you want to do that? It’s generally not what users want and we had many complaints before of users accidentally deleting everything too many times, so we removed the feature.

You could easily use our API to write a script that queries everything and deletes them, but I don’t think this will be a feature we provide in the UI.

1 Like

Thanks for the reply Matt.

I can check the API then if I have some free time.

Also depending on your use case, it might make sense to just “resolve all issues”. Usually the reason we hear for wanting this to start with a clean slate, and while I definitely get that, it’s generally better to avoid that situation (or use a diff project if you really need that).


my case - I had typo in project and got huge errors count in my sentry project. In order to clear all of them you could execute from command line

curl -i -d '{"status": "resolved"}' -H 'Content-Type: application/json' -H 'Authorization: Bearer YOUR_API_KEY' -X PUT

You may need to execute this command few times, until actually all issues will be resolved

i need this function too

1 Like

Just to avoid future replies: Its unlikely we’ll offer this functionality anytime soon, let alone ever. The only reason for deletion in Sentry is that you need to comply with retention policies or you need to remove data that has been deemed sensitive. Given that neither of these is “delete all events”, we’re not going to offer that feature. If you want to “remove all data”, you can remove the project. If you want to “start over with Sentry”, you simply can’t do that without creating a new project. That said, there’s little to no reason to “start over” given Sentry’s focus is on “whats happening recently” and that will continue to be even more true for our product.

@zeeg for the purpose of writing automated unit-tests (to test a Sentry SDK), is there any way to purge everything in all data-stores? Else one runs into Are some event payloads ignored? Is this documented anywhere?

unit testing sentry? unit testing that an event got into sentry?

if you’re asking: “can i send a bunch of events to sentry as part of my test suite and then truncate a entire project” - then the answer is no. technically you can, but its not a supported use case and it has consequences so we’re just going to stick with “its not possible”

if for whatever purpose you really need to do this, your solution would be to send them to a project with an appropriate tag, and then search on events with the given tag to identify them. that would allow you to correlate to them to e.g. a test run (which is how we do it ourselves).

sentry’s not optimized (and won’t ever really be) for data deletion. we ttl data which is a faster-path (still expensive), and support explicit delete only because its a needed thing in both security-minded and privacy-minded use cases. those explicit deletes require rewriting and often reprocessing a lot of data though which is why we limit their exposure.