free more space on my VPS server

EagleDotNet

Member
Oct 21, 2022
20
0
1
Egypt
cPanel Access Level
Root Administrator
Hi,
I am currently facing a problem in increasing the space on my server, which has reached 72 GB out of 100 GB, and all accounts do not exceed 42 GB in size. There are approximately 30 GB unknown, including the system space that does not exceed 10 GB, I think.

Also, I recently downloaded many packages and now I don't need them all, I just want everything that cPanel only needs.

I searched online and found this command, but I don't know what the system needs.

[[email protected] ~]# package-cleanup --quiet --leaves --exclude-bin
cpanel-geoipfree-data-108.0-1.cp108~el7.noarch
cpanel-knownproxies-data-108.0-1.cp108~el7.noarch
cpanel-libzip-devel-1.8.0-1.cp108~el7.x86_64
cpanel-perl-536-authen-libwrap-0.23-1.cp108~el7.x86_64
cpanel-perl-536-cpanel-xslib-0.07-1.cp108~el7.x86_64
cpanel-perl-536-crypt-cracklib-1.7-1.cp108~el7.x86_64
cpanel-perl-536-diff-libxdiff-0.05-1.cp108~el7.x86_64
cpanel-perl-536-lib-restrict-0.0.5-1.cp108~el7.noarch
cpanel-perl-536-local-lib-2.000029-1.cp108~el7.noarch
cpanel-perl-536-yaml-libyaml-0.83-1.cp108~el7.x86_64
glibc-static-2.17-326.el7_9.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libidn-devel-1.28-4.el7.x86_64
libsysfs-2.1.0-16.el7.x86_64
libtiff-devel-4.0.3-35.el7.x86_64
libtool-ltdl-devel-2.4.2-22.el7_3.x86_64
mysql-community-libs-compat-5.7.41-1.el7.x86_64
I have root access on WHM 108.0.11
The VPS server is running CentOS v7.9.2009
 

andrew.n

Well-Known Member
Jun 9, 2020
965
358
63
EU
cPanel Access Level
Root Administrator
Have you checked logs? Especially in /var/logs? that could easily add up space. Do you have Backups enabled? The default location on the server would be /backup and that wouldn't count against accounts disk space limit either.
 

EagleDotNet

Member
Oct 21, 2022
20
0
1
Egypt
cPanel Access Level
Root Administrator
Have you checked logs? Especially in /var/logs? that could easily add up space. Do you have Backups enabled? The default location on the server would be /backup and that wouldn't count against accounts disk space limit either.
This is the size of my server :

[[email protected] ~]# du -sh /* | sort -rh | head -n 10
du: cannot access ‘/proc/2496/task/12928/fdinfo/1075’: No such file or directory
du: cannot access ‘/proc/15678/task/15678/fd/3’: No such file or directory
du: cannot access ‘/proc/15678/task/15678/fdinfo/3’: No such file or directory
du: cannot access ‘/proc/15678/fd/3’: No such file or directory
du: cannot access ‘/proc/15678/fdinfo/3’: No such file or directory
du: cannot access ‘/proc/16197/task/16197/fdinfo/6’: No such file or directory
du: cannot access ‘/proc/16341’: No such file or directory
du: cannot access ‘/proc/16359’: No such file or directory
du: cannot access ‘/proc/16473’: No such file or directory
du: cannot access ‘/proc/16475’: No such file or directory
du: cannot access ‘/proc/16479’: No such file or directory
du: cannot access ‘/proc/16480’: No such file or directory
du: cannot access ‘/proc/16489’: No such file or directory
du: cannot access ‘/proc/16534’: No such file or directory
66G /home
2.9G /root
475M /boot
401M /run
60M /etc
56K /backup
4.0K /razor-agent.log
0 /sys
0 /srv
0 /scripts
This is home size only

[[email protected] ~]# du -sh /home/* | sort -rh | head -n 10
24G /home/virtfs
20G /home/Account1
7.8G /home/Account2
6.9G /home/Account3
2.9G /home/Account4
2.0G /home/Account5
1.6G /home/Account6
716M /home/Account7
655M /home/Account8
213M /home/Account9
 

xpy-xpy

Member
Jan 13, 2023
22
12
3
GE
cPanel Access Level
Root Administrator
/usr and /var can take up a lot of space, especially /var/lib/mysql

Don't see these directories accounted. Are they on a different volume?

What does df -h show?
 

EagleDotNet

Member
Oct 21, 2022
20
0
1
Egypt
cPanel Access Level
Root Administrator
Did you Remove unnecessary package?

Use command:

package-cleanup --quiet --leaves --exclude-bi
I just ran this command, and I didn't run a command after it.

[[email protected] ~]# package-cleanup --quiet --leaves --exclude-bin
cpanel-geoipfree-data-108.0-1.cp108~el7.noarch
cpanel-knownproxies-data-108.0-1.cp108~el7.noarch
cpanel-libzip-devel-1.8.0-1.cp108~el7.x86_64
cpanel-perl-536-authen-libwrap-0.23-1.cp108~el7.x86_64
cpanel-perl-536-cpanel-xslib-0.07-1.cp108~el7.x86_64
cpanel-perl-536-crypt-cracklib-1.7-1.cp108~el7.x86_64
cpanel-perl-536-diff-libxdiff-0.05-1.cp108~el7.x86_64
cpanel-perl-536-lib-restrict-0.0.5-1.cp108~el7.noarch
cpanel-perl-536-local-lib-2.000029-1.cp108~el7.noarch
cpanel-perl-536-yaml-libyaml-0.83-1.cp108~el7.x86_64
glibc-static-2.17-326.el7_9.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libidn-devel-1.28-4.el7.x86_64
libsysfs-2.1.0-16.el7.x86_64
libtiff-devel-4.0.3-35.el7.x86_64
libtool-ltdl-devel-2.4.2-22.el7_3.x86_64
mysql-community-libs-compat-5.7.41-1.el7.x86_64
 

vinaysingh0399

Registered
Dec 17, 2022
3
0
1
India
cPanel Access Level
Root Administrator
You can use the yum remove command to remove a package. For example, to remove the cpanel-geoipfree-data-108.0-1.cp108~el7.noarch package, you would run:

yum remove cpanel-geoipfree-data-108.0-1.cp108~el7.noarch
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,220
2,417
363
cPanel Access Level
Root Administrator
We have an excellent article here that shows you how to check disk usage on the server:


You'll want to start at / and then work your way down until you find individual files using the space.
 

EagleDotNet

Member
Oct 21, 2022
20
0
1
Egypt
cPanel Access Level
Root Administrator
You can use the yum remove command to remove a package. For example, to remove the cpanel-geoipfree-data-108.0-1.cp108~el7.noarch package, you would run:

yum remove cpanel-geoipfree-data-108.0-1.cp108~el7.noarch
Do you mean that all these packages are not important? Can I delete it safely? Will it not affect the work of WHM or cPanel?

cpanel-geoipfree-data-108.0-1.cp108~el7.noarch
cpanel-knownproxies-data-108.0-1.cp108~el7.noarch
cpanel-libzip-devel-1.8.0-1.cp108~el7.x86_64
cpanel-perl-536-authen-libwrap-0.23-1.cp108~el7.x86_64
cpanel-perl-536-cpanel-xslib-0.07-1.cp108~el7.x86_64
cpanel-perl-536-crypt-cracklib-1.7-1.cp108~el7.x86_64
cpanel-perl-536-diff-libxdiff-0.05-1.cp108~el7.x86_64
cpanel-perl-536-lib-restrict-0.0.5-1.cp108~el7.noarch
cpanel-perl-536-local-lib-2.000029-1.cp108~el7.noarch
cpanel-perl-536-yaml-libyaml-0.83-1.cp108~el7.x86_64
glibc-static-2.17-326.el7_9.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libidn-devel-1.28-4.el7.x86_64
libsysfs-2.1.0-16.el7.x86_64
libtiff-devel-4.0.3-35.el7.x86_64
libtool-ltdl-devel-2.4.2-22.el7_3.x86_64
mysql-community-libs-compat-5.7.41-1.el7.x86_64
 

EagleDotNet

Member
Oct 21, 2022
20
0
1
Egypt
cPanel Access Level
Root Administrator
We have an excellent article here that shows you how to check disk usage on the server:


You'll want to start at / and then work your way down until you find individual files using the space.
I have executed the command, but I do not know what to delete and what files or packages are not important or even folders that contain temporary or unnecessary files

1676043904769.png
 

andrew.n

Well-Known Member
Jun 9, 2020
965
358
63
EU
cPanel Access Level
Root Administrator
I think the best would be to hire a professional from Resources to have a look at this for you as you can easily do more harm than worth by deleting system files or files which shouldn't have been deleted.