#No space left on device (AWS EC2 instance)
https://stackoverflow.com/a/64221115/5066625
- Check for extra linux headers stored in `/usr/src`
Do:
``` sudo apt-get autoremove ```
Sometimes the above command can give error like this:
``` Reading package lists… Error! E: Could not create temporary file for /var/cache… (28: No space left on device) E: The package lists or status file could not be parsed or opened. ```
In this case, delete one or two old headers manually. To do this first go to /usr/src folder and list the files according to date(descending order) using below command:
``` cd /usr/src ls -lt ```
Then choose an old header file (e.g. `linux-aws-headers-4.4.0-1067`) and delete it using this command:
``` sudo rm -r linux-aws-headers-4.4.0-1067 ```
After doing this, the command `sudo apt-get autoremove` should work without any problem.