1833821 Members
2742 Online
110063 Solutions
New Discussion

cant swremove

 
SOLVED
Go to solution
Michael Dalanek
Advisor

cant swremove

Hi,

ive got an entry showing in swlist (10.20) but I cant seem to be able to swremove it. It simply says ERROR without any reason why. Is there a way to forceably remove it ?
5 REPLIES 5
Stefan Farrelly
Honored Contributor
Solution

Re: cant swremove


Try swremove . Thats a fullstop/period at the end of the product/bundle/fileset, eg; trying to remove a patch;

swremove PHKL_xxxx.

This will remove the entry from the IPD but wont actually remove any files.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Doug Sperle
Occasional Advisor

Re: cant swremove

Michael,

You can manually remove the entry by editing the IPD INDEX file using vi. The IPD INDEX file is /var/adm/sw/products/INDEX. This is true for 10.X as well as 11.0. To remove the entry from the file, edit it with vi or some other editor. Then search for the line

tag patch_name where patch name is the name of your patch. For example, if you are searching for patch PHSS_10000, then you would search for

tag PHSS_10000

When you find this line, the line immediately preceeding it should be

product

so you should have the following two lines

product
tag PHSS_10000

Start removing lines starting at product until the next product line. DO NOT REMOVE the next product line.

Be very, very careful if you edit the INDEX file, you can easily hose the IPD. I would save a copy of the INDEX before editing it.

After editing the IPD, remove the directory and all subdirectories and files with the name of the patch in /var/adm/sw/products. Do this as well in /var/adm/sw/patch in 10.20 or /var/adm/sw/save in 11.0. The patch directory is where the restore files are saved and are restored when you do an swremove. Actually, you may want to move the files saved in the patch directory back before removing the directory structure. Keep in mind that if any unconfigurations would be done with a swremove, you will not have that done with this procedure. You could look through /var/adm/sw/products/patch_name at the scripts if there are any for each fileset. You can run these your self if you want. These are the scripts swremove runs.
It runs the scripts in this order for each fileset:

checkremove
unconfigure
preremove
postremove

Some or none of theses scripts may exist under each fileset.

Do not run the install scripts. These are the scrips swinstall runs.
Tracey
Trusted Contributor

Re: cant swremove

Try cleanup -i, this will remove all superseeded patches from the IPD.
alberto vasquez
Trusted Contributor

Re: cant swremove

Check /var/adm/sw/products and if it is
not listed there, the index may be corrupted, try:
swmodify -u PHxx_xxxxx.*
(replace the x's with the appropriate
patch number of course)that should clean
up the mismatch between swlist and swremove.

S.
alberto vasquez
Trusted Contributor

Re: cant swremove

Check /var/adm/sw/products and if it is
not listed there, the index may be corrupted, try:
swmodify -u PHxx_xxxxx.*
(replace the x's with the appropriate
patch number of course)that should clean
up the mismatch between swlist and swremove.

S.