How to remove systemd from Ubuntu 16.04 and prevent its usage

15,507

Solution 1

Found that Debian - style pinning works perfectly. After the command above, this resolve the situation:

apt-get remove --purge --auto-remove systemd systemd:i386 -y
echo -e 'Package: systemd\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/systemd
echo -e '\n\nPackage: *systemd*\nPin: release *\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
echo -e '\nPackage: systemd:amd64\nPin: release *\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
echo -e '\nPackage: systemd:i386\nPin: release *\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd

Solution 2

See also the guide here: http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_an_Ubuntu_Xenial_installation#Related_pages

The inittab copy is not necessary and in that guide I address common problems of XFCE desktop environment (other DEs might have different issues with the removal of systemd)

Share:
15,507

Related videos on Youtube

giorgio
Author by

giorgio

Updated on September 18, 2022

Comments

  • giorgio
    giorgio over 1 year

    I was able to enable upstart and disable systemd with commands that follows, but I was not able to prevent its auto re-installation when invoking apt-get install lxde (I am used to a serious server configuration without complex gui or without gui at all).

    Please help: how can I prevent systemd auto installation for both 64 and 32 bit version? Thank you in advance.

    apt-get install upstart-sysv sysvinit-utils -y
    cp /usr/share/sysvinit/inittab /etc/inittab
    update-initramfs -u
    reboot
    

    and then

    apt-get remove --purge --auto-remove systemd systemd:i386 -y
    
    • Admin
      Admin almost 8 years
      systemd can be administered with CLI
    • Admin
      Admin over 7 years
      Just an FYI, this can be done but very painfully. Since most of Ubuntu has been moved into the SystemD world, not as many have SysVInit or Upstart compatible scripts anymore.
  • Nick Weinberg
    Nick Weinberg almost 8 years
    As systemd becomes more and more entwined in Ubuntu and Debian, you might also want to look into the Devuan project: they're a fork of Debian that removes all systemd dependencies (including, I believe, from packages like lxde) devuan.org
  • Underverse
    Underverse over 7 years
    Using a distro for which is designed to exclude or not to be dependent on systemd is a good start. See without-systemd.org for a list.
  • GNK
    GNK over 6 years
    I have uninstalled systemd but after rebooting i am not able to connect to the internet. (ubuntu16.04) how can i troubleshoot fix this?.