Debian / Ubuntu Linux

In order to disable ipv6 support, create a new file named 00local under /etc/modprobe.d directory and puts following two lines:
alias net-pf-10 off
alias ipv6 off

another way:
echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf

the third way:
# vi /etc/modprobe.d/aliases
Find the line:
alias net-pf-10 ipv6
Replace with:
alias net-pf-10 off
alias ipv6 off

Disabling IPv6  Support Red Hat Enterprise Linux 4
If the following line exists in the /etc/modprobe.conf file, remove it:
alias net-pf-10 ipv6 
Add the following line to the /etc/modprobe.conf file:
alias net-pf-10 off 
Reboot the system to disable IPv6 support.


Re-enabling IPv6 Support Red Hat Enterprise Linux 4
 
Remove the following line from the /etc/modprobe.conf file.
 
alias net-pf-10 off
 
You must reboot the system to activate IPv6 support.

Disabling IPv6 Support Red Hat Enterprise Linux 5
 
If the following line exists in the /etc/modprobe.conf file, remove it:
 
alias net-pf-10 ipv6
 
Add the following line to the /etc/modprobe.conf file:
 
alias net-pf-10 off
 
In versions of Red Hat Enterprise Linux before 5.4, add the following line to the /etc/modprobe.conf file:
 
alias ipv6 off
 
In Red Hat Enterprise Linux 5.4 and later, add the following line to the /etc/modprobe.conf file:
 
options ipv6 disable=1
 
To prevent errors during the network initscript start routine, change the NETWORKING_IPV6 parameter in the /etc/sysconfig/network file to the following:
 
NETWORKING_IPV6=no
 
For completeness, it is a good idea to configure the ip6tables service not to start at boot by issuing the following command:
 
chkconfig ip6tables off
 
Once both the alias net-pf-10 off and alias ipv6 off lines are present in the /etc/modprobe.conf file and NETWORKING_IPV6=no is set in the /etc/sysconfig/network file, reboot the system to disable IPv6 support.
 
Re-enabling IPv6 Support Red Hat Enterprise Linux 5
 
To re-enable IPv6 on Red Hat Enterprise Linux 5 systems, remove the following lines from the  /etc/modprobe.conf file:
 
alias net-pf-10 off
alias ipv6 off
 
Set the following parameter in the /etc/sysconfig/network file:
 
NETWORKING_IPV6=yes
 
Re-enable ipv6tables by issuing the following command:
 
chkconfig ip6tables on
 
You must reboot the system to activate IPv6 support.

After that, restart your system and ipv6 just gone away.

NOTE: If you have a distribution that ipv6 support compiled into main kernel not built as module you still disable ipv6 through proc interface, or adding following line into /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1