Permanent bulk delete of old topics

Our forum is near by reaching first year of usage.
Some of our category / topic is used for daily work,
We have lot of topics which is irrelevant in perspective of holding for long time.
Is there any feature or plan to implement some kind of deleting or archiving old topics.
Is there way to BULK delete topics using some kind of SQL queries.
Cloud I do something like in XX category delete all topics (post) older then date 1.1.2015.

Why I’ll love to delete posts is because I do not want to lose performances of my instance.
This is where we get in 10 months

Assumption is that 40% of this conversation is now irrelevant and longer required for holding.
If this going to speed up our discource why not delete old posts

1 Like

I think it is good to consider for longer term – if the content is truly of no value, it should be archived out somehow – but based on those numbers you should be fine for a while.

3 Likes

Just to share my requirements, I’ll be setting up discourse from smf. We have 10 years worth of SMF data, so I’d like to purge all except for the last 5 years worth. In addition, I’d like to be able to automatically delete posts older then 5 users once Discourse is operational.

Can the Discourse team please provide the solution for bulk permanent delete?

People have valid reasons to permanently delete topics in bulk, and having to go write code is not only impossible for non-coders, but much more error prone than an official solution.

I renamed the title of this feature request topic so it’s clearly about permanent bulk deletion. We can talk about the feature some here and flesh out what it might look like in the UI, but don’t get your hopes up that it will be implemented in the near future.

Permanently deleting posts comes with alot of risk, and bulk permanently deleting comes with alot of risk! Are you sure you really want to do that? Is your database really so big that you can’t live with the deleted topics, like everyone else? Or is there some other reason you want to permanently delete topics? Can you share your reasons?

There is Introducing permanently delete post functionality but that only works for one topic at a time.

As far as I know, it is currently not possible to see a list of deleted posts and then permanently bulk delete them, say based on criteria like age. You could write a script to do it from the command line, or if you are not comfortable ask in Marketplace for someone to do it for you.

Were such a feature to exist in the interface, can you describe in more detail how you think it should work?

Maybe the best approach would be something like this:

  • add filter to the advanced search to show topics that are deleted. That way you could combine with other filters (date range, tag, category, author, etc) to get the list of deleted topics you want to delete permanently.
  • when can_permanently_delete is enabled, also provide “Permanently delete” option in bulk actions.

(Please don’t crosspost the same request in multiple old topics - I deleted the other one)

It will be less risk with an official feature than people trying to run custom commands.

GitHub has permanent repo delete. I’ve been fine. They make you input the name of the org and the repo before deleting, and your password, to verify you want to do it.

I don’t see why this has to be blocked. It’s just annoying.

Yes. 100%. I don’t want junk in my DB, especially not jibberish junk from bots trying to get posts approved and wasting my time. Why would I want to keep that stuff?

Please give us an official tested way of doing it. Or at least a timer option to delete deleted posts after XX number of days.

You could add triple verification in the UX flow to reduce risk. For example, similar to the “delete 124 users” message when bulk deleting users, but also prompt for re-authentication, or something, to make it even less risky. Perhaps put up a flashy red warning message that has to be accepted. You can eliminate the risk by making people think thrice when bulk deleting posts.

The worst possible solution for this type of thing is no solution at all, from my end user perspective. I absolutely get annoyed thinking about this, that I can’t do something that I feel should be easy to do in the UI (with triple or quintuple verification, that’s fine!).

Half the storage taken up in my DB is jibberish spam bot content. I really don’t want to pay for more storage, I want to easily delete stuff and have double the life.

1 Like

I don’t disagree that this is would be a nice feature, which is why I’m asking for more details and collecting ideas for how it might look.

It’s not going to be a priority for us to implement as an official feature until more of our own customers ask for it. Having extra data in the database is not necessarily a problem, especially on our hosting where storage rarely is an issue.

A good first step would be to look at Bianca’s code in Introducing permanently delete post functionality and see if a bulk delete rake task could be created that is easy and safe to run. We have many rake tasks that are perfectly safe, and also many features that make it into the UI eventually that start out as rake tasks.

2 Likes