github.com/crowdsecurity/crowdsec@v1.6.1/debian/prerm (about)

     1  if [ "$1" = "remove" ]; then
     2     cscli dashboard remove -f -y --error || echo "Ignore the above error if you never installed the local dashboard."
     3     systemctl stop crowdsec
     4     systemctl disable crowdsec
     5  fi
     6  
     7  if [ "$1" = "upgrade" ]; then
     8     systemctl stop crowdsec
     9  fi