Operating System - HP-UX
1826354 Members
4882 Online
109692 Solutions
New Discussion

swremove removes only files?

 
SOLVED
Go to solution
Binu George
Advisor

swremove removes only files?

Hi,

Does swremove only remove "files" that belong to the depot being removed and not directories?
If yes, then is there any way to remove the directories as well?

-Binu
11 REPLIES 11
Marcel Boogert_1
Trusted Contributor

Re: swremove removes only files?

Hi there,

swremove removes all items including directories.

Regards, MB.
Arunvijai_4
Honored Contributor
Solution

Re: swremove removes only files?

It depends on how the preremove, postremove and unconfigure scripts are written. If a product uses any configuration files of its own, mostly swremove wont remove dir it belongs to.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Bharat Katkar
Honored Contributor

Re: swremove removes only files?

Hi binu,
If you are very sure that the direcory belong to that package itlsef then you can remove it manually.

rm -r

swinstall many times won't remove directories.

Regards,
You need to know a lot to actually know how little you know
morganelan
Trusted Contributor

Re: swremove removes only files?

The swremove command removes software_selections from target_selections (e.g. root filesystems). When removing installed software, swremove also unconfigures the software before it is removed. The software is not unconfigured when removed from an alternate root directory since it was not configured during installation. When removing available software (within a depot), swremove also does not perform the unconfiguration task.

Note: Selecting a bundle for removal does not always remove all filesets in that bundle. If a particular fileset is required by another bundle, that fileset will not be removed. For example, if the bundles Pascal and FORTRAN both use the fileset Debugger.Run and you try to remove FORTRAN , the fileset Debugger.Run will not be removed because it is also used by the bundle Pascal. This is done to prevent the removal of one bundle from inadvertently causing the removal of filesets needed by another bundle
Kamal Mirdad
Muthukumar_5
Honored Contributor

Re: swremove removes only files?

Based upon Software Distributor Package scripts preremove and postremove, swremove removes file and directories. Generally few directories are exisiting the machine with few files for upgradation same software package. Some of the products will leave message that please remove directory manually if you don't want for upgradation.

rm -rf

Example Packages: Netscape Directory Service, Legato Networker

If you don't want to use that specific s/w for future upgradation then remove directory.

hth.
Easy to suggest when don't know about the problem!
Leif Halvarsson_2
Honored Contributor

Re: swremove removes only files?

Hi,
Complete removing or not, depecds on the software packet.

For example, if removing Data Protector, the configuration directorys /etc/opt/omni and database directorys /var/opt/omni/db40 is left untouched.
Binu George
Advisor

Re: swremove removes only files?

Hi,

Thank you for all the responses.
I have a couple of products, which when swremoved, donot remove any of the directories. Only the files are removed.
Is this behaviour to be taken care of by using control scripts during packaging of the product?

Thanks,
Binu
Arunvijai_4
Honored Contributor

Re: swremove removes only files?

Yes binu, you are correct. Behaviour of swremove is totally defined in the control scripts. You can remove those directories, before doing that, take a look at the contents (files) inside.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Giri Sekar.
Trusted Contributor

Re: swremove removes only files?

Hi:

If you want to know exactly what Directories/files that particular product/fileset writes to you can do a tar xvf on the swpackaged file (which was swinstalled). That way you would know exactly what you remove and you would also get a chance to see the preremove, checkremove and postremove files (which control what would be removed from swremove)

Thanks

Giri Sekar.

"USL" Unix as Second Language
Binu George
Advisor

Re: swremove removes only files?


Thanks Arun.
This means to say, when packaging a product, I should take care to have a postremove script that takes care of removing the directories that the product gets installed into. Am I correct?

Thanks,
Binu
Binu George
Advisor

Re: swremove removes only files?

Arun has provided me with the answer to my query.

Thanks,
Binu