Disabling IPv6 and Removing Some Packages

I use this command on startup, is it good enough?

sysctl -w net.ipv6.conf.all.disable_ipv6=1
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
sysctl -w net.ipv6.conf.default.disable_ipv6=1
exit 0

Also, does anyone know which one of those ipv6 related packages can be removed without breaking OpenWRT?

  • ip6tables
  • kmod-ip6tables
  • kmod-nf-conntrack6
  • kmod-nf-ipt6
  • kmod-nf-reject6
  • luci-proto-ipv6
  • odhcp6c
  • odhcpd-ipv6only

I don't think you need to run that every time on startup.

I just disable IPv6 in LuCI.

I have used this to remove IPv6-related packages...

opkg remove ip6tables kmod-ip6tables kmod-nf-reject6 luci-proto-ipv6 --force-depends odhcp6c odhcpd-ipv6only kmod-nf-ipt6 kmod-nf-conntrack6 --force-depends

I don't think it makes a lot of difference.

If your goal is to save space, you need to build your own images. If you run opkg remove For packages that are included in the image, it will actually consume flash storage space to mark the packages as deleted (because it cannot actually delete them from ROM).


It doesn't.
It consumes only a bit more disk space for the deletion markers (like psherman says). Luckily they are small.