Hello groot,
to disable IPv6 on Debian/Ubuntu, the recommended solution is to add the following line in /etc/sysctl.conf :
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Before applying them with sudo sysctl -p