How to remove systemd from Ubuntu 16.04 and prevent its usage

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

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)