#!/bin/bash PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE" systemctl stop apm-daily-update systemctl disable apm-daily-update if [ "$1" = "remove" ] || [ "$1" = "purge" ];then echo "清理卸载残留" rm -rf /var/lib/apm/ for username in $(ls /home) do echo /home/$username if [ -d "/home/$username/.apm/" ] then rm -fr "/home/$username/.apm/" fi done else echo "非卸载,跳过清理" fi