Operating System - HP-UX
1758342 Members
1801 Online
108868 Solutions
New Discussion юеВ

Re: Directories not removed after package installation.

 
SOLVED
Go to solution
Srimalik
Valued Contributor

Directories not removed after package installation.

For one of our packages the directories belonging to that package are not removed from the filesystem when the package is removed. All the files are removed.
there are not error reported by SD.

What may be wrong?

Thanks
Sri
abandon all hope, ye who enter here..
6 REPLIES 6
Srimalik
Valued Contributor

Re: Directories not removed after package installation.

Please read the subject as: Directories not removed after package un-installation
abandon all hope, ye who enter here..
Dennis Handly
Acclaimed Contributor

Re: Directories not removed after package installation.

swremove never removes the directories, just the files. The directories could be shared.

You'll need to write a postremove control script to do this.
Srimalik
Valued Contributor

Re: Directories not removed after package installation.

Dennis, We already have a postremove script. And we are removing the base dir.

Is is correct?

I was under an impression that SD removes all the dirs which were created during installation.

-Sri
abandon all hope, ye who enter here..
Dennis Handly
Acclaimed Contributor
Solution

Re: Directories not removed after package installation.

>I was under an impression that SD removes all the dirs which were created during installation.

No, I don't think it does. The following says it removes "files" but doesn't explicitly point out that excludes directories. A lawyer could make a point it is working correctly. :-)
http://docs.hp.com/en/5992-2146/ch03s03.html

>we are removing the base dir.

If you did, it wouldn't be there. :-)
You would need to use "rm -rf base-dir", if there are subdirs.
Srimalik
Valued Contributor

Re: Directories not removed after package installation.

we are already using "rm -rf basedir" and it is removing the directory.

Because I had some free time today, I removed the rm command from postinstall just to try and found that SD is not removing directories, And created this topic beacuse I thought it was wrong behavior. :-)

Now I know that the "rm -rf " in postinstall is not void.


abandon all hope, ye who enter here..
Srimalik
Valued Contributor

Re: Directories not removed after package installation.

Queries resolved.
Closing thread.
abandon all hope, ye who enter here..