Announcing Changes to the MongoDB Community Forum. Learn More >
×
MongoDB Developer Community Forums
Remove field from entire collection
Working with Data
Developer Tools
mongodb-shell
,
aggregation
Leandro_Domingues
(Leandro Domingues)
April 16, 2020, 6:23pm
2
Hi! You can use:
db.coll.updateMany( {}, { $unset: {"yourField": ""} } )
3 Likes
show post in topic