-# Remove stale sandbox chroot directories owned by 'captive.captive':
-rm -rf %{_var}/lib/@PACKAGE@/s-*
-rm -rf %{_var}/lib/@PACKAGE@/tmp/*
-
-%if ! %{static}
-%postun fuse
-%endif
-/usr/lib/lsb/remove_initd @PACKAGE@ 2>/dev/null || \
- /sbin/chkconfig --del @PACKAGE@
-%{_initrddir}/@PACKAGE@ stop
-rm -f %{_var}/lock/subsys/@PACKAGE@
+# Only on real erase, not on upgrade:
+if [ $1 = 0 ];then
+ # Remove stale sandbox chroot directories owned by 'captive.captive':
+ rm -rf %{_var}/lib/@PACKAGE@/s-*
+ rm -rf %{_var}/lib/@PACKAGE@/tmp/*
+fi