Remove/Uninstall package "NetworkManager" and replace it with ifupdown: Can it be done?

Hi guys

I have been using Debian for many years now but plan to switch to Fedora.

I understand that in Fedora, the package NetworkManager is installed by default.

In Debian I only use the package ifupdown and not the package network-manager. Why is that so? Click the links in the next thread to find out more:

OpenVPN through network manager does not resolve VPN hosts

Using AirVPN with Debian Network Manager (NOT RECOMMENDED)

Issue with Openvpn-server and network-manager-openvpn-gnome

I use OpenVPN a lot (really a lot) in both Debian and Microsoft Windows.

Questions:

  1. Is it possible for me to uninstall/remove NetworkManager without breaking the installed Fedora?

  2. If your answer to (1) above is yes, what is the name of the Fedora package that performs the same functions as the Debian package ifupdown?

Thanks for your help.

Ariana Costello

1 Like

This is the first of two addenda to my original post to include the URLs of the articles mentioned therein. (AskFedora in English only allows new users to include a maximum of two links per post!!)

OpenVPN through network manager does not resolve VPN hosts

Using AirVPN with Debian Network Manager (NOT RECOMMENDED)

1 Like

This is the second of two addenda to my original post:

Issue with Openvpn-server and network-manager-openvpn-gnome

1 Like

I think NetworkManager is far too strongly linked to most desktop environments, so removing the package will probably try to also pull out lots of other bits. For example, on my F36 workstation, removing NetworkManager will also remove gnome-control-center because gnome-control-center requires NetworkManager (and cannot use ifupdow or other tools):

$ sudo dnf remove \*NetworkManager\*
Dependencies resolved.
========================================================================================================================================
 Package                                              Architecture      Version                       Repository                   Size
========================================================================================================================================
Removing:
 NetworkManager                                       x86_64            1:1.38.0-1.fc36               @updates                    5.7 M
 NetworkManager-adsl                                  x86_64            1:1.38.0-1.fc36               @updates                     40 k
 NetworkManager-bluetooth                             x86_64            1:1.38.0-1.fc36               @updates                    105 k
 NetworkManager-config-connectivity-fedora            noarch            1:1.38.0-1.fc36               @updates                    310
 NetworkManager-initscripts-ifcfg-rh                  x86_64            1:1.38.0-1.fc36               @updates                    311 k
 NetworkManager-initscripts-updown                    noarch            1:1.38.0-1.fc36               @updates                    2.1 k
 NetworkManager-libnm                                 x86_64            1:1.38.0-1.fc36               @updates                    9.3 M
 NetworkManager-openconnect                           x86_64            1.2.8-1.fc36                  @updates-testing            2.8 M
 NetworkManager-openconnect-gnome                     x86_64            1.2.8-1.fc36                  @updates-testing            151 k
 NetworkManager-openvpn                               x86_64            1:1.8.18-1.fc36               @updates-testing            1.2 M
 NetworkManager-openvpn-gnome                         x86_64            1:1.8.18-1.fc36               @updates-testing            370 k
 NetworkManager-ppp                                   x86_64            1:1.38.0-1.fc36               @updates                     75 k
 NetworkManager-pptp                                  x86_64            1:1.2.10-1.fc36               @updates-testing            602 k
 NetworkManager-pptp-gnome                            x86_64            1:1.2.10-1.fc36               @updates-testing            143 k
 NetworkManager-ssh                                   x86_64            1.2.12-3.fc36                 @fedora                     176 k
 NetworkManager-ssh-gnome                             x86_64            1.2.12-3.fc36                 @fedora                     112 k
 NetworkManager-vpnc                                  x86_64            1:1.2.8-1.fc36                @updates-testing            664 k
 NetworkManager-vpnc-gnome                            x86_64            1:1.2.8-1.fc36                @updates-testing            152 k
 NetworkManager-wifi                                  x86_64            1:1.38.0-1.fc36               @updates                    313 k
 NetworkManager-wwan                                  x86_64            1:1.38.0-1.fc36               @updates                    141 k
Removing dependent packages:
 chrome-gnome-shell                                   x86_64            10.1-15.fc36                  @fedora                      61 k
 evince-nautilus                                      x86_64            42.2-1.fc36                   @updates-testing             24 k
 firewall-config                                      noarch            1.0.4-1.fc36                  @updates-testing            1.1 M
 gdm                                                  x86_64            1:42.0-2.fc36                 @fedora                     4.8 M
 gnome-control-center                                 x86_64            42.1-2.fc36                   @updates-testing             20 M
 gnome-initial-setup                                  x86_64            42.1.1-1.fc36                 @updates-testing            2.5 M
 gnome-photos                                         x86_64            42.0-2.fc36                   @updates-testing            3.7 M
 gnome-pomodoro                                       x86_64            1:0.21.1-1.fc36               @updates-testing            6.8 M
 gnome-session-wayland-session                        x86_64            42.0-1.fc36                   @updates-testing             15 k
 gnome-session-xsession                               x86_64            42.0-1.fc36                   @updates-testing             16 k
 gnome-settings-daemon                                x86_64            42.1-1.fc36                   @updates-testing            6.0 M
 gnome-shell                                          x86_64            42.1-1.fc36                   @updates-testing            9.6 M
 gnome-shell-extension-appindicator                   noarch            42-1.fc36                     @updates-testing            185 k
 gnome-shell-extension-user-theme                     noarch            42.1-1.fc36                   @updates-testing            6.9 k
 gnome-tweaks                                         noarch            42~beta-1.fc36                @updates-testing            1.3 M
 libnma                                               x86_64            1.8.38-1.fc36                 @updates-testing            1.2 M
 nautilus                                             x86_64            42.1.1-1.fc36                 @updates-testing             14 M
 tracker-miners                                       x86_64            3.3.0-2.fc36                  @updates-testing            4.1 M
Removing unused dependencies:
 colord-gtk4                                          x86_64            0.3.0-1.fc36                  @fedora                      36 k
 gnome-control-center-filesystem                      noarch            42.1-2.fc36                   @updates-testing              0
 gnome-keyring                                        x86_64            40.0-4.fc36                   @fedora                     3.8 M
 gnome-keyring-pam                                    x86_64            40.0-4.fc36                   @fedora                      32 k
 gnome-online-miners                                  x86_64            3.34.0-10.fc36                @fedora                     376 k
 gnome-session                                        x86_64            42.0-1.fc36                   @updates-testing            1.5 M
 gnome-shell-extension-common                         noarch            42.1-1.fc36                   @updates-testing            530 k
 gnome-tour                                           x86_64            42.0-1.fc36                   @updates-testing            3.0 M
 libdazzle                                            x86_64            3.44.0-1.fc36                 @updates-testing            1.2 M
 libnma-gtk4                                          x86_64            1.8.38-1.fc36                 @updates-testing            353 k
 libxcvt                                              x86_64            0.1.1-2.fc36                  @fedora                      19 k
 malcontent                                           x86_64            0.10.3-2.fc36                 @fedora                     363 k
 malcontent-control                                   x86_64            0.10.3-2.fc36                 @fedora                     123 k
 malcontent-ui-libs                                   x86_64            0.10.3-2.fc36                 @fedora                     129 k
 mutter                                               x86_64            42.1-1.fc36                   @updates-testing             12 M
 nm-connection-editor                                 x86_64            1.26.0-2.fc36                 @updates-testing            4.6 M
 openvpn                                              x86_64            2.5.6-1.fc36                  @updates-testing            1.8 M
 pipewire-gstreamer                                   x86_64            0.3.51-1.fc36                 @updates-testing            129 k
 power-profiles-daemon                                x86_64            0.11.1-1.fc36                 @updates-testing            135 k
 xdg-desktop-portal-gnome                             x86_64            42.1-1.fc36                   @updates-testing            669 k
 xorg-x11-server-Xwayland                             x86_64            22.1.1-1.fc36                 @updates-testing            2.2 M

Transaction Summary
========================================================================================================================================
Remove  59 Packages

Freed space: 131 M
Is this ok [y/N]:

So, uninstalling it is going to be a bit of an issue. What you can probably do is disable it by disabling the systemd service? That way it remains installed to satisfy the various dependencies, but it is not used.

What does it really provide? I already have ifup and ifdown on my system here—provided by NetworkManager:

$ which ifup
/usr/sbin/ifup

$ which ifdown
/usr/sbin/ifdown

$ rpm -qf /usr/sbin/ifup /usr/sbin/ifdown
NetworkManager-initscripts-updown-1.38.0-1.fc36.noarch
NetworkManager-initscripts-updown-1.38.0-1.fc36.noarch

Have you had a look at this, which specifically has examples on split DNS with a VPN?

There’s also the openvpn command on the terminal if you can use that:

$ rpm -qf /usr/sbin/openvpn
openvpn-2.5.6-1.fc36.x86_64
(ins)[asinha@thor  ~]$ which openvpn
/usr/sbin/openvpn

There is an alternative ‘legacy’ network config package called ‘network-scripts’.
You might try installing that either with or without NetworkManager (read the docs).

I think the issue wrt VPNs has been resolved.
ifup/ifdown (the originals) were deprecated years ago, as they use a deprecated part of the network calls.
‘ip’ is the preferred command.

‘ip route …{appropriate options}…’ should resolve the routine issue described.
(if I understand it correctly).
command is preferred.

ifup/ifdown are in the same package (rpm) as NetworkManager.
There is likely no requierment to remove nm, just disable it through systemctl.

1 Like

ifup and ifdown are closely related to NetworkManager. There is a legacy package
initscripts-10.16-2.fc36.src.rpm with the old scripts. To my experience, NetworkManager is fine. If there are troubles with openvpn DNS, I think the first thing to look into is the way how OpenVPN modifies the name server configuration, and whether this is compatible with systemd-resolved, if active. The pull-resolv-conf scripts delivered with F36 openvpn should be, I think. Otherwise systemd-resolved should be stopped and disabled and dns configuration changed by /etc/resolv.conf modification.