open /etc/default/grub edit to GRUB_CMDLINE_LINUX="ipv6.disable=1" update-grub
Tested in Debian 9.x and debian 10.x
open /etc/default/grub edit to GRUB_CMDLINE_LINUX="ipv6.disable=1" grub2-mkconfig -o "$(readlink -e /etc/grub2.cfg)"
Tested in CentOS Linux release 7.6.1810 (Core)