What files and/or directories can I remove in /var/sadm
What files and/or directories can I remove in /var/sadm or for that matter in /var?
When I first loaded this E250 5 years ago, I was younger and dummer
Last night I was installing the latest Solaris 8 Recommended patches
and the systen gave me an error message that I did not have enough space.
Not knowing what I could safely remove, I moved the pkg directory (which was the biggest) to a larger disk drive and established a link. When I came in this morning I moved the pkg back to the /var/sadm.I think some house cleaning is needed, but I am not sure about what to remove.
Thanks, Mike
[627 byte] By [
mndavies] at [2007-11-26 10:39:43]

# 1
Well, you can cleanout older and larger files in /var/adm, /var/tmp, /var/log
/var/sadm is a bit trickier.
You can delete basically anything in /var/sadm/spool
After that it gets harder.
Assuming you want to maintain the abilitity to backup at least 1 revision of patches, you can cleanout the data for larger patches before the most recent revision.
The patch backout data is in /var/sadm/pkg/<PKGName>/save/<patch number>
But a patch will touch many packages and you should delete a given patch from all the packages it affects.
So pick a big package
du -sk /var/sadm/pkg/* | sort -n | tail -10
On my system SUNWcarx is the biggest
Look for a big patch affecting that package
du -sk /var/sadm/pkg/SUNWcarx/save/* | sort -n | tail -10
On my system, 112233 be a good choice.
Check to see how many revisions of 112233 are installed
showrev -p | grep 'Patch: 112233'
In my case 112233-12 is the latest. So I can delete anything older than -12
To delete 112233-11
List the instances for a sanity check
ls -d /var/sadm/pkg/*/save/112233-11
assuming it looks sensible
rm -rf var/sadm/pkg/*/save/112233-11
And repeat the process for other packages/ patches.