Updating leave old files behind.

azzid

Verified User
Joined
Jan 19, 2011
Messages
9
I have numerous servers running custombuild. We update these monthly.

After a few updates I seem to get quite alot of old installation folders for, among other things, mysql:
Code:
server:~# du -sh /usr/local/mysql*
0       /usr/local/mysql
487M    /usr/local/mysql-5.1.54-linux-x86_64
488M    /usr/local/mysql-5.1.55-linux-x86_64
130M    /usr/local/mysql-5.1.55-linux-x86_64.tar.gz
488M    /usr/local/mysql-5.1.56-linux-x86_64
130M    /usr/local/mysql-5.1.56-linux-x86_64.tar.gz
488M    /usr/local/mysql-5.1.57-linux-x86_64
130M    /usr/local/mysql-5.1.57-linux-x86_64.tar.gz
488M    /usr/local/mysql-5.1.58-linux-x86_64
130M    /usr/local/mysql-5.1.58-linux-x86_64.tar.gz
488M    /usr/local/mysql-5.1.59-linux-x86_64
130M    /usr/local/mysql-5.1.59-linux-x86_64.tar.gz
488M    /usr/local/mysql-5.1.60-linux-x86_64
130M    /usr/local/mysql-5.1.60-linux-x86_64.tar.gz
488M    /usr/local/mysql-5.1.61-linux-x86_64
130M    /usr/local/mysql-5.1.61-linux-x86_64.tar.gz
486M    /usr/local/mysql-5.1.62-linux-x86_64
130M    /usr/local/mysql-5.1.62-linux-x86_64.tar.gz
487M    /usr/local/mysql-5.1.63-linux-x86_64
130M    /usr/local/mysql-5.1.63-linux-x86_64.tar.gz
488M    /usr/local/mysql-5.1.65-linux-x86_64
130M    /usr/local/mysql-5.1.65-linux-x86_64.tar.gz

Is it fair to assume that only the folder with the highest version number (and the one pointed to by the mysql-symlink) is the one in use?

Is it safe to assume the older ones is just to delete?
What is the recommended way to do such "housekeeping"?
 
go to /usr/local/directadmin/custombuild

Set these options in options.conf

clean=yes
clean_old_tarballs=yes
clean_old_webapps=yes

Then run:

Code:
./build clean
 
Please correct me if I'm wrong, it (./build clean) won't remove old directories of MySQL from /usr/local/. So the only way it is to remove them manually.
 
Can somebody explain me if i can delete all old files, without problems?

After updating on a small vps drive was full! :-(. How come CustomBuild don't delete this files?

Somebody have a script to clean this old files? :)

Code:
root@servername:/usr/local/directadmin/custombuild# du -sh /usr/local/mysql*
0       /usr/local/mysql
986M    /usr/local/mysql-5.6.12-linux-x86_64
975M    /usr/local/mysql-5.6.15-linux-x86_64
265M    /usr/local/mysql-5.6.15-linux-x86_64.tar.gz
975M    /usr/local/mysql-5.6.16-linux-x86_64
265M    /usr/local/mysql-5.6.16-linux-x86_64.tar.gz
972M    /usr/local/mysql-5.6.17-linux-x86_64
265M    /usr/local/mysql-5.6.17-linux-x86_64.tar.gz
 
Got an answer:

Yes, you can remove the directories, just make sure you don't remove your currently used one (mysql -V).

So i checked mysql -v and deleted everything regarding earlier versions.

Anybody thanks!
 
Last edited:
Back
Top