For categories the sorted set that stores the ids is categories:cid
. So to delete all categories
db.getSortedSetRange('categories:cid', 0, -1, function(err, cids){
deleteAllCategories(cids); //can use categories.purge() internally
});
For users the sorted set is users:joindate
, similar to categories.
db.getSortedSetRange('users:joindate', 0, -1, function(err, uids) {
deleteAllUsers(uids); //can user User.delete internally
});
Now categories.purge
also purges topics and posts inside them so this should be enough, but for whatever reason there are left over topics or posts you can do the same for those as well. The sorted set that stores all the topic ids is topics:tid
and the sorted set that stores all the post ids is posts:pid
.
So to recap the list of sorted sets that store cid, uid, tid and pid respectively are categories:cid
, users:joindate
, topics:tid
and posts:pid
.
Let me know if you need anything else.