Page 1 of 1

Clean /var/log/removed_packages/

Posted: 24. Sep 2022, 07:45
by SalixManiac
Hello everyone,

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

thank you in advance.

Re: Clean /var/log/removed_packages/

Posted: 24. Sep 2022, 08:35
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.

Re: Clean /var/log/removed_packages/

Posted: 28. Sep 2022, 17:30
by Van_Vinkle
Very useful script.
Thanks, djemos