I've created an rpm for VMware that stops the vmware processes before uninstalling (the %preun script) and starts the processes after installing (the %post script): --- %post # Make VMware start/shutdown automatically when the machine does it. /sbin/chkconfig --add vmware # Restart in the same way that vmware will be started normally. /etc/rc.d/init.d/vmware start %preun /etc/rc.d/init.d/vmware stop # Remove autostart of vmware if test $1 = 0 then /sbin/chkconfig --del vmware fi --- An upgrade of this package, with no changes to either the %post or %preun scripts, should presumably stop the vmware process, delete it from chkconfig control and then upgrade the package, add it to chkconfig control, and start the vmware processes. What happens instead is that the rpm is upgraded first, and then the processes are started (%post script) and lastly, the processes are stopped (%preun script). This looks like the wrong order, to me.
The version of rpm is rpm-3.0.2-6.0
Rpm always installs (and runs %post) before uninstalling (and runs %preun. Rewrite your %preun as follows: # Remove autostart of vmware if test $1 = 0 then /etc/rc.d/init.d/vmware stop /sbin/chkconfig --del vmware fi