I noticed that the package UFW had been removed from a server, but do not recall having manually removed it. Looking at the logs at /var/log/apt/history.log, I noticed this entry:
Start-Date: 2024-06-24 18:56:55
Commandline: apt-get install -y iptables-persistent
Requested-By: ealfonso (1000)
Install: iptables-persistent:amd64 (1.0.20), netfilter-persistent:amd64 (1.0.20, automatic)
Remove: ufw:amd64 (0.36.2-1)
End-Date: 2024-06-24 18:57:06
I did request iptables-persistent to be installed. Does the log above indicate that the UFW removal was triggered by installing iptables-persistent?
From the iptables-persistent package description there doesn't appear to be a direct conflict with UFW, and according to this answer, UFW can be compatible with iptables-persistent.
-yif you don't want unpleasant surprises.ufw? Is there a conflict in one of the dependencies?