Server Gigabit Guide

Dealing with Insufficient Storage on Your HDD/SSD

You are here:
Estimated reading time: 1 min

Running out of disk space can cause various problems, such as websites becoming unreachable, gameservers becoming unavailable, and other services failing to start. To avoid these problems, it is important to identify and remove large files from your system. In this guide, we will show you how to do this on both Linux and Windows systems.

Finding Big Files on Linux

  1. Connect to your server using SSH.

  2. Gain root privileges by entering the following command:

sudo -i
  1. Execute the following command to find the top 10 largest files:
cd /
find -type f -exec du -Sh {} + | sort -rh | head -n 10
  1. Once the command finishes executing, a list of the 10 largest files will be displayed. These files might be old downloads or large log files. Files that are no longer used can be safely deleted. Before deleting log files, it is recommended to check them for errors that you can resolve to prevent the issue from recurring.

  2. To delete a file, use the following command:

rm <path_to_file>

Finding Big Files on Windows

  1. Download and install the freeware TreeSize from the following link:
http://www.jam-software.de/treesize_free/?language=EN
  1. Run TreeSize and select the partition you want to scan.

  2. A list of all files on the selected partition will be displayed.

  3. Carefully review the list and delete any unnecessary files. Avoid deleting Windows system files.

Conclusion

By following these instructions, you can effectively identify and remove large files from your system to free up disk space and prevent potential problems.

Was this article helpful?
Dislike 0
Views: 17