Fix 2 : Using the du Command
Now that you know which storage space is causing the problem, try finding out which folders and files are taking up the most space by using the du command. Use the -h option to show the sizes in a way that’s easy to understand, and you can optionally use the sort command to put all the biggest folders at the top of the list.
Command :
sudo du -h | sort -h
Output :
How to Fix the “No space left on device” Error in Linux
When you try to save files or write data on a Linux system, you might get the “No Space Left on Device” error. This error means that the storage space you are trying to use is full and does not have enough room left for your operation. To fix this error, you can either make more space available in the storage space or increase the total amount of storage space.
In this tutorial, we will show you how to resolve the “No Space Left on Device” error and review some basic Linux commands to help you identify the problem.
How to Fix the “No space left on device” Error in Linux
- Fix 1 : Using the df command
- Fix 2 : Using the du Command
- Fix 3 : Clear your Browser Cache
- Fix 4 : Clearing Temporary Files
- Fix 5 : Deleting Old Log Files
- Fix 6 : Clearing Package Cache
- Fix 7 : Resizing Partitions
- Fix 8 : Removing Unnecessary Software