Operating System - HP-UX
1832984 Members
2921 Online
110048 Solutions
New Discussion

Wanting to clear /var/adm/sw/products

 
Marius Botha
Advisor

Wanting to clear /var/adm/sw/products

In the /var/adm/sw/products directory I have 719 files, which mainly are PH files (patches). If I do a du -sk on the products mountpoint I get 33668 back - which is wasted space to me.
Now, I have done a listing of installed patches on my system - what is the best way to remove the PH files from this directory, should I use rm or is there a sw command to remove/verify what I want to do. Ps: I have recently taken over this system, so no idea what was done on it in the past.
Cheers
Dont ask for permission, ask for forgiveness
11 REPLIES 11
Stefan Farrelly
Honored Contributor

Re: Wanting to clear /var/adm/sw/products

The only way to safely remove stuff from /var/adm/sw/ is to; swmodify -x patch_commit=true \*

This will remove all old patches and free up a lot of space in /var/adm/sw, but not much from the products directory. Do NOT rm anything under the /var/adm/sw tree or else you risk corrupting Software Distributors IPD and making future swinstall's impossible.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Trond Haugen
Honored Contributor

Re: Wanting to clear /var/adm/sw/products

Another alternative is using 'cleanup -c 1'.
If you have upgraded from 10.20 you can also run 'cleanup -i'.
cleanup is available thru a patch.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Zeev Schultz
Honored Contributor

Re: Wanting to clear /var/adm/sw/products

Don't agree on that.The safest way to clean
is to use cleanup utility (man cleanup).In 10.20 install PHCO_20824 (both workstations and servers).

Zeev

HP RCE
So computers don't think yet. At least not chess computers. - Seymour Cray
Marius Botha
Advisor

Re: Wanting to clear /var/adm/sw/products

I am running HP-UX 11 and it is across K-class and N-class servers respectively.
Dont ask for permission, ask for forgiveness
Stefan Farrelly
Honored Contributor

Re: Wanting to clear /var/adm/sw/products


FYI, the cleanup utility simply uses the swmodify -x command I listed earlier - its the same thing.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Marius Botha
Advisor

Re: Wanting to clear /var/adm/sw/products

Stefan,

Is cleanup only to be used on a system migrated from 10.20 to 11? Can I use this on a system which was initially a 11 build?

Cheers
marius
Dont ask for permission, ask for forgiveness
Stefan Farrelly
Honored Contributor

Re: Wanting to clear /var/adm/sw/products


The cleanup utility exists on 10.20, 11.0 and 11.11. Go ahead and use it - it has more options and does extra checking so I guess its the preferred way to reduce space in /var/adm/sw
Im from Palmerston North, New Zealand, but somehow ended up in London...
Marius Botha
Advisor

Re: Wanting to clear /var/adm/sw/products

Thanks all, I will try cleanup tomorrow at the office and assign points.

Cheers
marius
Dont ask for permission, ask for forgiveness
Zeev Schultz
Honored Contributor

Re: Wanting to clear /var/adm/sw/products

Just check that you have SD cumulative patch
higher or equal to PHCO_23966 (11.0,fixed in 11i).There was an issue of conflicts btw cleanup and SD.

Zeev

HP RCE
So computers don't think yet. At least not chess computers. - Seymour Cray
Bill Hassell
Honored Contributor

Re: Wanting to clear /var/adm/sw/products

A note as to why all the space is taken up: Occasionally, a patch is recalled or needs to be removed and the previous patch left in it's place. This is quite complicated in some flavors of Unix, but with the Software Distributor utilities (swinstall, swremove) and the /var/adm/sw directories, it is quite easy.

rather than be concerned about the space, create another logical volume dedicated just to the products and software that has been installed. Then move everything from /var/adm/sw to the new location and create a new mountpoint as /var/adm/sw.

NOTE: Simply rm'ing the files will terminate your ability to load patches and/or new applications using swinstall! This is not a good situation at all.


Bill Hassell, sysadmin
Trond Haugen
Honored Contributor

Re: Wanting to clear /var/adm/sw/products

Just to add to Bills comment. With cleanup in 10.x you could remove all patch-backups whereas in 11.x it will not remove the last. There is a good reason for that. Removing the last would leave you with no posibilty to go back (swremove a patch).

Regards,
Trond
Regards,
Trond Haugen
LinkedIn