Note: Do not do this in production unless you know what you are doing. It will affect performance.
If you are on Ubuntu perform these steps:
- Stop mongodb
sudo service mongodb stop
- Edit the mongodb configuration
sudo nano /etc/mongodb.conf
- Add this to the file and save/close:
smallfiles=true
- Remove old journal files:
sudo rm -rf /var/lib/mongodb/journal
- Start mongodb
sudo nano service mongodb start