10

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
giorgio
  • 189
  • 1
  • 1
  • 8
  • systemd can be administered with CLI – pfeiffep May 30 '16 at 20:55
  • 1
    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. – Thomas Ward Jan 20 '17 at 21:44

2 Answers2

8

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
Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
giorgio
  • 189
  • 1
  • 1
  • 8
  • 6
    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) https://devuan.org/ – Nick Weinberg May 31 '16 at 00:45
  • 3
    Using a distro for which is designed to exclude or not to be dependent on systemd is a good start. See http://without-systemd.org for a list. – Underverse Jan 14 '17 at 13:47
  • I have uninstalled systemd but after rebooting i am not able to connect to the internet. (ubuntu16.04) how can i troubleshoot fix this?. – GNK Jan 24 '18 at 04:17
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)

gdm85
  • 46
  • 2