I recently upgraded my 16.04 server system to 18.04, and then tried to use netplan to set up networking. Unfortunately, now my network settings are broken and I don't know which files belong to which network configuration system.

The /etc/network/interfaces file still contains data, and there are a bunch of other files in /etc/network whose purpose I don't know.

What I want to do is start over with the following config:

  version: 2
  renderer: networkd
      dhcp4: yes
      dhcp6: yes
      interfaces: [enp4s0]
      dhcp4: true
        stp: false
        forward-delay: 0

Can anyone tell me what files I actually need and what's just cruft that should be deleted? This system is only supposed to have one bridged network device and have openssh-server, lxc, and docker running. This is what's currently there:

# tree network
├── fan
├── if-down.d
│   ├── resolvconf
│   └── ubuntu-fan
├── if-post-down.d
│   ├── bridge -> /lib/bridge-utils/ifupdown.sh
│   ├── ifenslave
│   ├── ubuntu-fan
│   ├── vlan
│   └── wireless-tools
├── if-pre-up.d
│   ├── bridge -> /lib/bridge-utils/ifupdown.sh
│   ├── ethtool
│   ├── ifenslave
│   ├── vlan
│   └── wireless-tools
├── if-up.d
│   ├── 000resolvconf
│   ├── avahi-daemon
│   ├── ethtool
│   ├── ifenslave
│   ├── ip
│   ├── openssh-server
│   └── ubuntu-fan
├── interfaces
└── interfaces.d

5 directories, 21 files
# tree netplan
└── 01-netcfg.yaml

0 directories, 1 file
# tree NetworkManager/
└── conf.d
    └── 10-ubuntu-fan.conf

1 Answer 1


If you are upgrading to 18.04 and want to use netplan instead of ifupdown, then you should do the following:

  1. make sure you have a way to access your server if the network goes down
  2. make sure the package netplan.io is installed (it should be on 18.04).
  3. create a netplan yaml according to your config. There are many examples to choose from.
  4. sudo netplan apply
  5. sudo apt purge ifupdown
  6. Reboot
  7. You should now be "migrated", and networkctl, ip addr, etc, should show your interfaces.

Note, there will still be cruft in /etc/network/. You can remove/archive:

  • /etc/network/interfaces
  • /etc/network/interfaces.d/

The rest are "hook" directories, that other packages put files in that try to react to the network state of the system. These files should be left alone.

If you have any files that you have put in there, these same facilities are better done by integrating into systemd unit files, or by using networkd-dispatcher. See more on the netplan FAQ.

  • I followed these instructions on Ubuntu 18.04 and what happened was it created a new user account called 'netplan-daemon' which was available when I restart in Gnome, and the NetworkManager settings in the Bionic Beaver GUI disappeared, leaving only the VPN configuration option. Not sure why but the results were bad for me.
    – jsstuball
    Feb 6, 2019 at 10:04
  • 2
    make sure you are apt install netplan.io. note the .io! I made the same mistake as you so I had to apt purge netplan
    – kfix
    Feb 27, 2019 at 5:33
  • My configuration is super simple with one interface but when I ran step 5 "sudo apt purge ifupdown" the machine became inaccessible. What could be the reason for that. May 14, 2020 at 2:06
  • Like @oᴉɹǝɥɔ, I found that my ssh connection was aborted when running "apt purge ifpdown". When I logged back in by other means (without rebooting), I found that the ethernet interface was down. The solution is to use a semicolon in the shell command to do both commands one after the other: apt -y purge ifupdown ; netplan apply
    – rohanc
    Jun 23, 2020 at 6:22
  • I also had to apt purge resolvconf as discussed here
    – gerardw
    Jan 28, 2021 at 10:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .