Amazon EC2 instance is out of space because "root" file is gigantic
Solution 1:
That is saying that you have 7.7GB available in your main file system, and you've filled it. It's not AWS / EC2 who've filled it, it's files on your instance.
BEFORE you do anything go into the AWS console and take a snapshot (aka backup) of your EBS instance. You can do this while the instance is running and it should be ok, but for a 100% consistent backup you can stop the instance first. DO NOT terminate the instance or you will lose your disk.
You have a couple of options:
- Install the ncdu utility, if there's space, to help work out what is taking the space to delete it.
- Enlarge the EBS volume in the AWS console then enlarge the Linux file system of the instance.
Here's how to install and run ncdu
sudo su
apt update
apt install ncdu
cd /
ncdu .