if you create some files in prein or in postin, you can use %ghost for marking the ownership for them in your .spec file. That way they are removed during uninstall.