Nội dung
In the process of using DirectAdmin, we will regularly upgrade the version of the add-on software. After a while, the capacity of the custombuild folder will swell a lot.
Here, my folder occupies up to 1.2GB.
So what is the reason for the custombuild folder to increase in size?
The reason the custombuild folder increases in size is that every time we update a certain software such as Apache, Mysql, PHP, ImageMagick, Let’s Encrypt… VPS/Server will download the installation file. Latest. But will not automatically delete the previous installation file.
So after updating the software to 10 versions, we will have up to 10 installation files. So it takes up a lot of space on our VPS/Server.
For example, below are the files in my custombuild folder.
Only lego software has up to 3 download versions. So to clean up the custombuild DirectAdmin folder we continue to follow these steps.
Cleanup the custombuild folder on DirectAdmin
To clean up the custombuild folder on DirectAdmin, we follow these three steps.
Step 1: SSH into your DirectAdmin system
To clean up the custombuild folder on DirectAdmin, we first need to SSH or access your VPS/server as root. If you do not know how to SSH into your VPS/Server, you can refer to the following tutorial:
After successfully SSH, we continue with step 2 to check or upgrade the Custombuild version to facilitate cleaning the custombuild DirectAdmin directory.
Step 2: Check the CustomBuild version
To continue the process of cleaning up the custombuild folder DirectAdmin, we need to see if the version of CustomBuild in use is 2.0 or not. To check the version of CustomBuild you are using, please check out the following short tutorial:
In case your CustomBuild version is lower than 2.0 then you need to upgrade CustomBuild 1.x to 2.0 , you can check out the following tutorial:
Here is my CustomBuild version after the latest update:
We continue to step 3 as the final step to clean up the custombuild folder on DirectAdmin.
Step 3: Commands to clean up the custombuild folder on DirectAdmin
After doing step 2, we continue to clean up the custombuild folder on DirectAdmin with the following two commands:
cd /usr/local/directadmin/custombuild/ ./build clean
After executing the above two commands, most of the old installation files will be deleted, but there may be some files that are not deleted because these files are not part of the configuration file. options.conf, if necessary we execute a few more commands:
rm -f *.bz2 rm -f *.tgz
Then check again, all the installation files have been completely deleted, and the custombuild folder space no longer takes up as much space as the original.
So we’re done cleaning up the custombuild folder on DirectAdmin.
Summary
Through this article, we know how to clean up the Custombuild folder on DirectAdmin, upgrade the Custombuild version.
Hope the article is useful to you. Wishing you success.