1

Here's the current usage

Filesystem      Size  Used Avail Use% Mounted on
udev            488M     0  488M   0% /dev
tmpfs           100M   11M   89M  11% /run
/dev/xvda1      7.7G  7.7G  396K 100% /
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           496M     0  496M   0% /sys/fs/cgroup
tmpfs           100M     0  100M   0% /run/user/1000

Below are output of du -ah . | sort -rh | head -20 in respective folders:

/user:

223M  .
179M  ./.composer/cache/repo/https---packagist.org
179M  ./.composer/cache/repo
179M  ./.composer/cache
179M  ./.composer
44M ./git/myapp
44M ./git
20M ./git/myapp/.git
19M ./git/myapp/.git/objects
16M ./git/myapp/.git/objects/pack/pack-906b417ebaebc4922a90397b82f180cdd8f59570.pack
16M ./git/myapp/.git/objects/pack
14M ./git/myapp/marc-v2-backend.zip
6.9M  ./git/myapp/public
5.0M  ./.composer/cache/repo/https---packagist.org/provider-illuminate$view.json
5.0M  ./.composer/cache/repo/https---packagist.org/provider-illuminate$validation.json
5.0M  ./.composer/cache/repo/https---packagist.org/provider-illuminate$support.json
5.0M  ./.composer/cache/repo/https---packagist.org/provider-illuminate$session.json
5.0M  ./.composer/cache/repo/https---packagist.org/provider-illuminate$routing.json
5.0M  ./.composer/cache/repo/https---packagist.org/provider-illuminate$queue.json
5.0M  ./.composer/cache/repo/https---packagist.org/provider-illuminate$mail.json

/var:

287M  ./lib
272M  ./www/html/myapp
272M  ./www/html
272M  ./www
172M  ./www/html/myapp/node_modules
152M  ./lib/apt/lists
152M  ./lib/apt
124M  ./cache
116M  ./cache/apt
115M  ./lib/dpkg
114M  ./lib/dpkg/info
66M ./www/html/myapp/vendor
40M ./lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages
35M ./lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_xenial_universe_source_Sources
31M ./cache/apt/srcpkgcache.bin
31M ./cache/apt/pkgcache.bin
28M ./cache/apt/pkgcache.bin.PysQE6
27M ./cache/apt/archives
23M ./lib/apt/lists/ap-southeast-1.ec2.archive.ubuntu.com_ubuntu_dists_xenial_universe_i18n_Translation-en

Tried to run in / but ran out of space for logs.

There's a 1GB Swapfile:

              total        used        free      shared  buff/cache   available
Mem:           990M        121M         88M         22M        781M        624M
Swap:          1.0G        101M        922M

What could be causing the 6GB bloat?

  • 1
    Could you post output of: sudo find / -type f -size +1000M -exec ls -lh {} \; – Pasi Suominen Oct 25 '19 at 19:49
  • Does rebooting fix the issue? I've had a similar problem where I deleted a file but the space wasn't marked as usable until I rebooted. – NerdOfLinux Oct 25 '19 at 20:04
  • 1
    Thanks! I'd found linux header files clogging the space. Have removed them with sudo apt-get autoremove. – resting Oct 25 '19 at 20:18
2

The bulk of the usage was in /usr/src.

Apparently there were lots of linux header files in there amounting to 3GB!

Did the following:

sudo apt-get update
sudo apt-get -f install (cause there were some unmet dependencies)
sudo apt-get autoremove

ubuntu@:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-aws-headers-4.4.0-1022 linux-aws-headers-4.4.0-1039 linux-aws-headers-4.4.0-1041 linux-aws-headers-4.4.0-1043
  linux-aws-headers-4.4.0-1044 linux-aws-headers-4.4.0-1048 linux-aws-headers-4.4.0-1049 linux-aws-headers-4.4.0-1052
  linux-aws-headers-4.4.0-1054 linux-aws-headers-4.4.0-1055 linux-aws-headers-4.4.0-1057 linux-aws-headers-4.4.0-1060
  linux-aws-headers-4.4.0-1061 linux-aws-headers-4.4.0-1062 linux-aws-headers-4.4.0-1065 linux-aws-headers-4.4.0-1066
  linux-aws-headers-4.4.0-1069 linux-aws-headers-4.4.0-1070 linux-aws-headers-4.4.0-1072 linux-aws-headers-4.4.0-1074
  linux-aws-headers-4.4.0-1075 linux-aws-headers-4.4.0-1077 linux-aws-headers-4.4.0-1079 linux-aws-headers-4.4.0-1083
  linux-headers-4.4.0-1022-aws linux-headers-4.4.0-1039-aws linux-headers-4.4.0-1041-aws linux-headers-4.4.0-1043-aws
  linux-headers-4.4.0-1044-aws linux-headers-4.4.0-1048-aws linux-headers-4.4.0-1049-aws linux-headers-4.4.0-1052-aws
  linux-headers-4.4.0-1054-aws linux-headers-4.4.0-1055-aws linux-headers-4.4.0-1057-aws linux-headers-4.4.0-1060-aws
  linux-headers-4.4.0-1061-aws linux-headers-4.4.0-1062-aws linux-headers-4.4.0-1065-aws linux-headers-4.4.0-1066-aws
  linux-headers-4.4.0-1069-aws linux-headers-4.4.0-1070-aws linux-headers-4.4.0-1072-aws linux-headers-4.4.0-1074-aws
  linux-headers-4.4.0-1075-aws linux-headers-4.4.0-1077-aws linux-headers-4.4.0-1079-aws linux-headers-4.4.0-1083-aws
  linux-image-4.4.0-1022-aws linux-image-4.4.0-1039-aws linux-image-4.4.0-1041-aws linux-image-4.4.0-1043-aws
  linux-image-4.4.0-1044-aws linux-image-4.4.0-1048-aws linux-image-4.4.0-1049-aws linux-image-4.4.0-1052-aws
  linux-image-4.4.0-1054-aws linux-image-4.4.0-1055-aws linux-image-4.4.0-1057-aws linux-image-4.4.0-1060-aws
  linux-image-4.4.0-1061-aws linux-image-4.4.0-1062-aws linux-image-4.4.0-1065-aws linux-image-4.4.0-1066-aws
  linux-image-4.4.0-1069-aws linux-image-4.4.0-1070-aws linux-image-4.4.0-1072-aws linux-image-4.4.0-1074-aws
  linux-image-4.4.0-1075-aws linux-image-4.4.0-1077-aws linux-image-4.4.0-1079-aws linux-image-4.4.0-1083-aws
  linux-modules-4.4.0-1077-aws linux-modules-4.4.0-1079-aws linux-modules-4.4.0-1083-aws
0 upgraded, 0 newly installed, 75 to remove and 205 not upgraded.
After this operation, 3214 MB disk space will be freed.

After removing those header files, usage is down to 3.3GB. With 1GB swap that's around 2GB of various files which I think is quite reasonable.

Filesystem      Size  Used Avail Use% Mounted on
udev            488M     0  488M   0% /dev
tmpfs           100M   11M   89M  11% /run
/dev/xvda1      7.7G  3.3G  4.5G  42% /
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           496M     0  496M   0% /sys/fs/cgroup
tmpfs           100M     0  100M   0% /run/user/1000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.