I am in the process of trying to automate Proxmox5 to Proxmox6 as much as possible for some simple 1 node setups out in the field.
I am able to automate most of the apt-get aspect using something like this.
DEBIAN_FRONTEND=noninteractive \
apt-get \
-o Dpkg::Options::=--force-confnew \...