Table of contents

Development VM

Fix low disk space in development

You may run out of disk space when replicating data into your development environment. The default VM disk size is 150GB.

First check if you are out of disk space on your host machine (df -h). If your host machine has plenty of available space, then the problem may be the space allocated to the VM for its root partition.

You can run ncdu / from the command line to browse the filesystem and identify large directories and files. On your host machine you could also use graphical tools like Disk Inventory X.

What to delete on your host machine

On the host machine, you can safely delete:

  • Old backups from ~/govuk/govuk-puppet/development-vm/replication/backups/
  • Old log files from ~/govuk/*/logs

What to delete on the VM

On the VM, you can safely delete old Elasticsearch indexes:

$ cd /var/govuk/govuk-puppet/development-vm/replication
$ bundle exec ruby close_and_delete_old_indices.rb

If you plan on replicating all your data again, you can also delete big mongodb databases to clear space.

$ mongo
> show databases
> use draft_content_store_development
> db.dropDatabase()

Similarly, you can find large postgres databases with:

$ sudo -u postgres psql
> \l+

You can also remove dependencies that were installed with applications but are no longer needed by running:

$ sudo apt-get autoremove
This page was last reviewed on 5 December 2018. It needs to be reviewed again on 5 June 2019 by the page owner #govuk-developers .
This page was set to be reviewed before 5 June 2019 by the page owner #govuk-developers. This might mean the content is out of date.