How to cleanup only issues?

Hi,

How to cleanup only issues and related data with the sentry cleanup command without affecting users, teams or other organization-related data? Do I have to pass the specific model names via –model? If so, is there a pre-defined list of models?

Thanks

The deletion code is here: https://github.com/getsentry/sentry/blob/9774d33134368cbd87445837a6087f1ba5c689aa/src/sentry/runner/commands/cleanup.py#L175-L186

It should not affect anything else as far as I can read. Then only suspicion is over the OrganizationMember model but that seems like a transactional model. @matt, ideas?

Any updates on this? I don’t want to delete the members or teams in the process.

I’m not sure the question. Running cleanup is safe and effectively what we do in production for sentry.io.

Things that are deleted outside of issues and events are just old stale things, like, membership invites that weren’t accepted. Users aren’t deleted here or teams or anything.

1 Like