How do I permanently delete old virtual network devices?

Hi guys, an old Linode (2016) has a bunch of fake network interfaces that I would like to permanently get rid of.

Some findings:

# ls -gG --time-style='+' /sys/class/net
total 0
lrwxrwxrwx 1 0  erspan0 -> ../../devices/virtual/net/erspan0
lrwxrwxrwx 1 0  eth0 -> ../../devices/pci0000:00/0000:00:04.0/virtio2/net/eth0
lrwxrwxrwx 1 0  gre0 -> ../../devices/virtual/net/gre0
lrwxrwxrwx 1 0  gretap0 -> ../../devices/virtual/net/gretap0
lrwxrwxrwx 1 0  ip6gre0 -> ../../devices/virtual/net/ip6gre0
lrwxrwxrwx 1 0  ip6tnl0 -> ../../devices/virtual/net/ip6tnl0
lrwxrwxrwx 1 0  ip6_vti0 -> ../../devices/virtual/net/ip6_vti0
lrwxrwxrwx 1 0  ip_vti0 -> ../../devices/virtual/net/ip_vti0
lrwxrwxrwx 1 0  lo -> ../../devices/virtual/net/lo
lrwxrwxrwx 1 0  sit0 -> ../../devices/virtual/net/sit0
lrwxrwxrwx 1 0  teql0 -> ../../devices/virtual/net/teql0
lrwxrwxrwx 1 0  tunl0 -> ../../devices/virtual/net/tunl0


# ls -l /sys/devices/virtual/net
drwxr-xr-x 5 root root 0 Nov 20 18:49 erspan0
drwxr-xr-x 5 root root 0 Nov 20 18:49 gre0
drwxr-xr-x 5 root root 0 Nov 20 18:49 gretap0
drwxr-xr-x 5 root root 0 Nov 20 18:49 ip6gre0
drwxr-xr-x 5 root root 0 Nov 20 18:49 ip6tnl0
drwxr-xr-x 5 root root 0 Nov 20 18:49 ip6_vti0
drwxr-xr-x 5 root root 0 Nov 20 18:49 ip_vti0
drwxr-xr-x 5 root root 0 Nov 20 18:49 lo
drwxr-xr-x 5 root root 0 Nov 20 18:49 sit0
drwxr-xr-x 5 root root 0 Nov 20 18:49 teql0
drwxr-xr-x 5 root root 0 Nov 20 18:49 tunl0

# rm /sys/class/net/gre0
rm: cannot remove '/sys/class/net/gre0': Operation not permitted

# ip link delete gre0 returns nothing, and it's still there.

Running Arch Linux with the latest kernel 5.8.10-x86_64-linode138
All Boot Helpers enabled, should I try without them?

Any ideas?

1 Reply

Linode Staff

You can disable these interfaces by using the command ip link set $interfacename down, though I don't know that this would actually delete the interfaces. Something else you may want to try would be to change kernels. Again, I'm not sure that this would remove the network interfaces, but it is something to try. I'm hopeful that a user more familiar with Arch Linux networking will comment here with a more definitive answer, but I wanted to give you something to get started on!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct