添加卸载删除插件和软件用户数据: 1.deb包,只有当执行dpkg --purge或者-P时,会删除当前用户默认的软件用户数据. 2.rpm包,rpm -e就会删除当前用户默认的软件用户数据.

This commit is contained in:
chriswang521 2023-05-25 17:09:54 +08:00
parent 184984c9cc
commit 3bf7cec732
2 changed files with 9 additions and 0 deletions

View File

@ -9,3 +9,10 @@ rm -f /usr/bin/@@NAME@@
if hash update-mime-database 2>/dev/null; then if hash update-mime-database 2>/dev/null; then
update-mime-database /usr/share/mime update-mime-database /usr/share/mime
fi fi
case "$1" in
purge|P)
rm -rf /home/${SUDO_USER}/.config/Code\ -\ OSS
rm -rf /home/${SUDO_USER}/.vscode-oss
;;
esac

View File

@ -58,6 +58,8 @@ update-mime-database /usr/share/mime &> /dev/null || :
%postun %postun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
rm -f /usr/bin/@@NAME@@ rm -f /usr/bin/@@NAME@@
rm -rf /home/${SUDO_USER}/.config/Code\ -\ OSS
rm -rf /home/${SUDO_USER}/.vscode-oss
fi fi
# Update mimetype database for removed workspace mimetype # Update mimetype database for removed workspace mimetype