Undo enableSharding()

How do you undo sharding on the database after it has been enabled?

Just to clarify, sharding is done at the collection level rather than the database level.

I am not aware of any command to undo the sharding of a collection. But you can easily copy the shared data into a new collection. Then drop the original collection, so all indexes and sharding information will be gone. You may then move back all the data under the original name.

Hi @Altiano_Gerung,

Great question! We have a great community forum where you can have an in-depth conversation about specific use cases and interesting problems that you get to solve using MongoDB. I would highly recommend posting your question there for a more involved discussion.

Please feel free to reach out if you have any questions.

Kind Regards,

I posted here