Clean /var/log/removed_packages/

General talk about packaging procedures and packages.
Post Reply
User avatar
SalixManiac
Posts: 113
Joined: 15. Apr 2022, 02:26

Clean /var/log/removed_packages/

Post by SalixManiac »

Hello everyone,

Anyone know the procedure to delete the files in /var/log/removed_packages/ ?

thank you in advance.
Colin Chapman “light is right” those last words "the middle pedal is for cowards"
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Clean /var/log/removed_packages/

Post by djemos »

Yes you can do this. But, if you think at all that it might be a useful log of the machine's update history you might consider compressing them instead.
Download clean_pkg_logs
This script retains the most recent 2 log files for each package and removes the older logs freeing up disk space. This helps keep those 2 directories more manageable. The script has 2 modes (test mode & remove mode) that create 3 /tmp logs (unique, keep & remove) of the activity.
First run it with

Code: Select all

sudo sh clean_pkg_logs test
and then with

Code: Select all

sudo sh clean_pkg_logs remove
to really remove the files
In my system /var/log/removed_packages/ was about 1.5GB. Now it is 82MB.
/var/log/removed_scripts/ was 139MB. Now it is 35MB.
User avatar
Van_Vinkle
Donor
Posts: 157
Joined: 25. Oct 2012, 17:39

Re: Clean /var/log/removed_packages/

Post by Van_Vinkle »

Very useful script.
Thanks, djemos
Post Reply