I am using Fedora 10, I have created an rpm file for my software. It removes all the files from the installed directory. If i use yum remove command or rpm -e command. but after installation my application automatically creates some extra folders in home directory. If I uninstall my application then file from home directories do not get removed. So what I have to do. Is there anything that I have to write in my spec file?
Asked
Active
Viewed 2,003 times
2
-
You *might* get more traction on this sort of issue over on http://serverfault.com/ (Then again, it's a fifty/fifty call.) – John Parker Nov 13 '09 at 12:25
1 Answers
4
You need to create a post-uninstall script inside your rpm.
The %postun Script
The %postun script executes after the package has been removed. It is the last chance for a package to clean up after itself. Quite often, %postun scripts are used to run ldconfig to remove newly erased shared libraries from ld.so.cache.
See: Maximum RPM: Taking the Red Hat Package Manager to the Limit
-
Looks like this page has moved to http://rpm.org/max-rpm-snapshot/s1-rpm-inside-scripts.html – Glenn Dec 14 '16 at 15:27