Deleting posts due to duplicates

Hi

On an import that I have done I have noticed that some posts were duplicated, the full post was imported correctly but another post with just the first post was also imported. Is there a way to delete these posts that were duplicated and had no replies from the back end?

1 Like

How did you import them? The import scripts add a import_id custom field to keep this from happening.

There is a way to delete the duplicate posts, but the hard part will be knowing which posts are duplicates.

3 Likes

They would have 0 replies and there would be another topic with same title with 0 or more replies

How did you import them? Import scripts create a post custom field with the import id. But if it’s not too late, you’d be best off just deleting the database and running the import again.

You can delete the topics with something like

t=Topic.find(123).first
t.destroy

You’d want to do something more clever to find the topics.