It does not matter if you do website hosting, provide a gameserver or use other services, if you have no space left on your HDD/SSD problems will occur. Your websites might not be reachable anymore, your players cannot connect to your gameserver or all other services will not start.
To avoid this it is necessary to find big files on your system and to get rid of them. Today we will show you how to do this.
Linux:
If you’re not sure about your admin rights, always enter the command sudo -i at the beginning of every session:
sudo -i
This command will grant you the rights of a power user, so you don’t have to write the command sudo at the beginning of every command line. Now:
1. Connect to your server using SSH
2. Execute the following code:
# Change into root folder cd / # Find the top 10 files. This may take a while: find -type f -exec du -Sh {} + | sort -rh | head -n 10
Once finished, a list of the ten largest files will be displayed. Normally these files might be old downloads or big log files. Files that are no longer used can be deleted, of course. Before deleting log files you should check them for errors you can solve so that the issue will be permanently fixed.
3. Using the command below you can remove files
rm <path_to_file>
Windows:
In Windows you might not find big log files but forgotten downloads. To find them the following freeware is perfect:
http://www.jam-software.de/treesize_free/?language=EN
Once you downloaded and executed the software you can start scanning a partition. A list of all files will be displayed. Please make sure not to delete Windows system files 😉 .