These are the steps for Grub. Edit the /etc/default/grub file and locate the GRUB_CMDLINE_LINUX variable. Add ipv6.disable=1 to the value of this variable. Now run $ sudo update-grub and reboot your computer.