title: Reducing MongoDB database file size
body: <p>I've got a MongoDB database that was once large (>3GB). Since then, documents have been deleted and I was expecting the size of the database files to decrease accordingly.</p>
  
  <p>But since MongoDB keeps allocated space, the files are still large.</p>
  
  <p>I read here and there that the admin command <code>mongod --repair</code> is used to free the unused space, but I don't have enough space on the disk to run this command.</p>
  
  <p>Do you know a way I can freed up unused space?</p>