cat <<EOF | sudo tee /etc/apt/preferences.d/pin-uncontrolled Package: your-package-name Pin: version * Pin-Priority: 1001 EOF This prevents APT from replacing your manual package during upgrades. If you must install an uncontrolled deb that has missing dependencies, you can force it:
# Instead of manual .deb, use: sudo snap install your-app flatpak install flathub your-app These formats are containerized, update automatically, and never break system dependencies. To remove an uncontrolled package and its files: ncontrol deb
apt list --installed | grep -v "now" Or more precisely: cat <<EOF | sudo tee /etc/apt/preferences