mongoose deleteAll code example
Example 1: remove everything from mongodb databaase mongoose
await Challenge.deleteMany({})
await Own.deleteMany({})
await User.deleteMany({})
Example 2: delete document mongose
Model.deleteOne({ options }, function (err) {});
Example 3: clean collection mongoose
await Model.deleteMany();