#!/bin/sh set -e # Post-removal script for deb-bootupd # This script runs after the package is removed # Reload systemd to clean up service references if command -v systemctl >/dev/null 2>&1; then deb-systemd-invoke daemon-reload >/dev/null 2>&1 || true fi # Remove the symlink if it still exists if [ -L /usr/bin/bootupctl ]; then rm -f /usr/bin/bootupctl fi # Note: We don't remove /boot/bootupd-state.json as it contains # important bootloader state that should persist across package removals # Users can manually remove it if they want to reset everything