In case someone need to do this too, the correct commands are
// Remove the list of favorited posts from all users.
db.objects.remove({_key: /^uid:\d+:favourites$/})
// Remove the list of users who favourited the post from all posts.
db.objects.remove({_key: /^pid:\d+:users_favourited$/})
// Remove the favorite count from all posts.
db.objects.updateMany({"_key":/post:[0-9]+/g},{$set: {reputation: 0}})