1826639 Members
3326 Online
109695 Solutions
New Discussion

Cleanup After Patching

 
SOLVED
Go to solution
Steven Chen_1
Super Advisor

Cleanup After Patching

I would like to know if patches are installed on /var/adm/sw/save so that I can safely remove those depot files on location such as /var/patch/depot.

Comments are appreciated.

Steven
Steve
9 REPLIES 9
Robert-Jan Goossens
Honored Contributor
Solution

Re: Cleanup After Patching

Hi Steven,

There is a cleanup utility on HPUX.

# cleanup -p -c 2
-p preview
-c x Commit patches superseded at least X times.

Check the man page for more information.

Hope this helps,
Robert-Jan
A. Clay Stephenson
Acclaimed Contributor

Re: Cleanup After Patching

By far, the easist method is to simply run the "cleanup" command. It will do all of this for you and safely.

For example, cleanup -c 1 will remove all the old patches that have been superceded at least 1 time. Man cleanup for details.

PS. If this is an early version of HP-UX 11.0, the cleanup command was accidently omitted. You may need to install a patch to get the comand.
If it ain't broke, I can fix that.
Steven Chen_1
Super Advisor

Re: Cleanup After Patching

Thanks for the quick help.

By the way, I don't need to rm /var/adm/sw/save files yet, as I have enough space.

What I need is just the depot files removed on /var/patch/depot (I swcopy patches there first before swinstall). Would that be save?

Any comments?
Steve
Steven Chen_1
Super Advisor

Re: Cleanup After Patching

Thanks for the quick help.

By the way, I don't need to rm /var/adm/sw/save files yet, as I have enough space.

What I need is just the depot files removed on /var/patch/depot (I swcopy patches there first before swinstall). Would that be safe?

Any comments?
Steve
Pete Randall
Outstanding Contributor

Re: Cleanup After Patching

Steven,

Yes, that's safe - run "swremove -d" to get rid of them.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Cleanup After Patching

You should unregister the depot first using swreg -u. Man swreg for details or you can use swremove to remove your temporary depot OR you can use SAM -> Software Management -> Remove Depot Software.
If it ain't broke, I can fix that.
Steven Chen_1
Super Advisor

Re: Cleanup After Patching

Clay,

Last question: after swreg, can I use "rm" instead of using sam to swremove?

Thanks alot.
Steve
A. Clay Stephenson
Acclaimed Contributor

Re: Cleanup After Patching

Yes, although swremove will do all the operations for you but you can do a swreg -u xxxxx and then a rm -r yyyyy. That's up to you.

A good technique is to use SAM this first time and then examine the SAM logs. You will see the steps in the correct order.
If it ain't broke, I can fix that.
Steven Chen_1
Super Advisor

Re: Cleanup After Patching

Every guys, thanks for the help!

I have never seen any tech forum that is filled up with so many serious & knowledgable folks!

Steve