Showing results for 
Search instead for 
Do you mean 

Patch cleanup all?

Trusted Contributor

Patch cleanup all?

I have a new server 11.11 that I would like to cleanup the /var/adm/sw/save patch dir.

I ran cleanup -c 1 and ran cleanup -s. I started with 783 patches in save and now there

are still 461 left. How do you clean all of them out?  I have no intention of backing out patches

on a new server. Or am I missing something here with why these patches are still there.

 

9 REPLIES
Acclaimed Contributor Acclaimed Contributor

Re: Patch cleanup all?

>I ran cleanup -c 1

 

You would probably need to use "-c 0" to get rid of all of them.  You may want to do this very selectively or you won't be able to backout any patches.

Acclaimed Contributor Acclaimed Contributor

Re: Patch cleanup all?

Hi:

 

If you truly want to remove the roll-back information for all patches, do:

 

# swmodify -x patch_commit=true \*

 

In point of fact, I do this after I am satisfied that an earlier patch session hasn't yielded any problems and just before starting another (e.g. with a QPK bundle).

 

Regards!

 

...JRF...

Highlighted
Trusted Contributor

Re: Patch cleanup all?

[ Edited ]

Well,   swmodify -x patch_commit=true \*  removed them all. But I got a lot of these

error messages:

 

.

.

.

ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-SPA-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-B-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-E-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".

Acclaimed Contributor Acclaimed Contributor

Re: Patch cleanup all?

>ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-SPA-U-MSG"  because its patch state is not "applied" or  "superseded".

 

What does this show: swlist -l fileset -a state -a patch_state PHSS_39077

I assume the -s in "cleanup -s -c 0" may fix it?

Hmm, you said you did "cleanup -s".

Exalted Contributor Exalted Contributor

Re: Patch cleanup all?

Shalom,

 

You can not commit a patch that is in the wrong state.

 

swverify <patch name>

swconfig <patch name>

 

You may need to run swremove on the patch or swinstall -x reinstall=true

 

Be careful wit that last one.

 

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Trusted Contributor

Re: Patch cleanup all?

[ Edited ]

Dennis, 0 is not a valid number for cleanup -c.

 

 nothing shown for

 

 # swlist -l fileset -a state -a patch_state PHSS_39077                
# Initializing...
# Contacting target "mabank"...

#

Trusted Contributor

Re: Patch cleanup all?

Now your scaring me Steven. In the logs. The last patch was:

 

ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".

.

.

 

But it was committed afterwords. ??


* Committing the patch fileset "PHSS_39077.UX-TCH-U-MSG".

 

 

 

 # swverify PHSS_39077.UX-TCH-U-MSG

=======  07/13/11 15:43:03 CDT  BEGIN swverify SESSION
         (non-interactive) (jobid=mabank-0042)

       * Session started for user "root@mabank".

       * Beginning Selection
       * Target connection succeeded for "mabank:/".
       * Software selections:
             PHSS_39077.UX-TCH-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa=HP-UX_B.11.11_32/64
       * Selection succeeded.


       * Beginning Analysis
       * Session selections have been saved in the file
         "/.sw/sessions/swverify.last".
       * The analysis phase succeeded for "mabank:/".
       * Verification succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log mabank-0042 @ mabank:/".

=======  07/13/11 15:43:09 CDT  END swverify SESSION (non-interactive)
         (jobid=mabank-0042)

 

 

 

 # swconfig PHSS_39077.UX-TCH-U-MSG

=======  07/13/11 15:43:41 CDT  BEGIN swconfig SESSION
         (non-interactive) (jobid=mabank-0043)

       * Session started for user "root@mabank".

       * Beginning Selection
       * Target connection succeeded for "mabank:/".
       * Software selections:
             PHSS_39077.UX-TCH-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa=HP-UX_B.11.11_32/64
       * Selection succeeded.


       * Beginning Analysis
       * Session selections have been saved in the file
         "/.sw/sessions/swconfig.last".
       * "mabank:/":  1 filesets have already been configured.
       * Analysis succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log mabank-0043 @ mabank:/".

=======  07/13/11 15:43:47 CDT  END swconfig SESSION (non-interactive)
         (jobid=mabank-0043)

 

 

 

Acclaimed Contributor Acclaimed Contributor

Re: Patch cleanup all?

Hi (again):


jerrym wrote:

Well,   swmodify -x patch_commit=true \*  removed them all. But I got a lot of these

error messages:.

ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-SPA-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-B-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-E-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".


I suspect that this patch was *already* commited.  To satisfy yourself that all is well, you could do:

 

# swverify \*

 

Regards!

 

...JRF...

Acclaimed Contributor Acclaimed Contributor

Re: Patch cleanup all?

>nothing shown for

 

I would expect something like:

# PHSS_37902
  PHSS_37902.LIBIO77-CAT                configured     applied

...