We have some 30 + websites hosted on a dedicated server . The Server disk partions are /dev/sda2 and dev/sda3

Dev/sda2 has only 20GB space in it and we are frequently running our of space literally every other day.


As you can see we have only 1.5GB space inside it.

Last time I cleared the var/log folder which had nearly 3 GB content in it. With the command rm -rf /var/log .But this time the log folder has only 181M

I have run the du -sh command for each folder in var folder and following are the biggest directory inside var/

root@server [/var]# du -sh var/cpanel >> 3.2G

root@server [/var]# du -sh var/cache >> 1015M

root@server [/var]# du -sh var/softaculous >> 497M

root@server [/var]# du -sh var/cagefs >> 187M

root@server [/var] # du -sh var/log >> 183M

root@server [/var]# du -sh var/lve >> 63M

I have to clear some space in order to keep the sites running . I want to know which folder contents are okay to delete from the above?

My concern is root@server [/var] can contain some configuration files. which I dont want to delete. Inside root@server [/var] which folder contents are safe to delete. For example what happens if I clear /var/cache folder?

Last time while clearing var/log file I did run the rm -rf /var/log command from root@server [~] # instead of root@server [/] # . That deleted var/log/apache2 folder and all the sites were down. They were showing internal server error. However creating the folder brought the sites back.

Can you please suggest which folder contents are okay to delete from here.

Additional information

From WHM -> List of cpanel account -> disk partition I can see all the cpanel accounts are on /dev/sda3

enter image description here

/dev/sda2 is saved for hard-drive and MYSQL and Apache.


2 Answers 2


I would handle that differently... You have that huge barely used 3TB disk, and the directory that holds your server data (/var/www? ) is likely a good deal of the 18G used on sda2.

You should be able to move your server data directory to your sda3 filesystem and replace it in /var by a soft link or a bind mount to that new directory.

  • Hello Thanks for your response. You have to be little more clear as i am not knowledgeable enough in server and linux sector. All our Cpanel account is under /sda3 . there is www folder inside - root@server [/var] - i.e root@server [/var/www] . But that folder contains only 84K data . So I suspect this folder does not contain the site files.
    – Bashabi
    Commented Feb 5, 2020 at 13:33
  • My concern is root@server [/var] can contain some configuration files. which I dont want to delete. I have mentioned which folders inside root@server [/var] are biggest. Among them which folder contents are safe to delete. for example what happens if I clear /var/cache folder?
    – Bashabi
    Commented Feb 5, 2020 at 13:35
  • The same I recommended answering the 564719 question
    – schweik
    Commented Feb 6, 2020 at 12:48

Please, look ad some basic tutorial of these forum, and try to look for important information about your OS and applications e.g.:

uname -a

can give us some basic information of a type of your used Linux Distribution and kernel version. In case of HW problems the

lspci -nnk

can give us some usefull information about some parts of your hardware


gives overview about connected USB devices, and:

lsusb -vd1234:5678

can show more detailed info for a specific USB device defined by a two four hex digit number: IDvendor:IDproduct (in example 1234:5678)


shows overview of process tree whilest

ps ax

gives a detail info about all processes

lsof -p 456

gives list of all files opened by process with an id number (456)

As seen from far a way, your decision to let the greatest amount of the disk space to client data was not verified by experience, because html pages could represent a small part of user data, and you can find during the run of the system, that besides the /var/log you will see to grow the directory with the database content, and some other application data e.g. the various caches (usualy in /var/cache/*). Some of the applications can be configured to store their huge data to some specific location, some location can be linked to free space volume. But you have to know some basic skil to manipulate with your system without a danger to fall it down.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .