How to remove systemd from a Debian jessie/sid installation

From Without Systemd
(Difference between revisions)
Jump to: navigation, search
(removed outdated and reputedly inaccurate howto instructions)
 
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
  +
contents of this page were more than a year old and, reputely, were no longer accurate.<br>
  +
(still available via the "history" of this page if you care to review them)
   
== Switching to old good SysV init ==
+
Please repost a known/tested accurate set of instructions here.
 
First install the SysV init packages
 
# apt-get install sysvinit-core sysvinit sysvinit-utils
 
Then reboot your machine and remove all of the systemd packages.
 
<span style="color:red;">BE AWARE</span> that the following command removes packages that depend on systemd itself or things like libpam-systemd!
 
# apt-get remove --purge --auto-remove systemd
 
Prevent apt from installing systemd packages in the future.
 
# echo -e 'Package: systemd\nPin: origin ""\nPin-Priority: -1' > /etc/apt/preferences.d/systemd
 
Prevent apt from installing any systemd like packages in the future (note the star before and after systemd)
 
# echo -e '\n\nPackage: *systemd*\nPin: origin ""\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
 
Note: This prevents the installation of the package [https://packages.debian.org/de/jessie/systemd-shim systemd-shim] as well. However this is a emulation of systemd functions, so you can install software which depends on systemd. So if you get "Package systemd-shim is not available, but is referred to by another package." you might temporary disable the three lines in the preferences.d/systemd file.
 
 
In the case your system uses multiarch (mixed 32 and 64bit packages), you need to pin the 64bit version of systemd too. Otherwise apt-get could still install it as dependency later.
 
# echo -e '\nPackage: systemd:amd64\nPin: origin ""\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
 
 
In other multiarch cases where amd64 is the default architecture, you may have to pin the i386 package to prevent APT from installing it:
 
# echo -e '\nPackage: systemd:i386\nPin: origin ""\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
 
 
 
== To enable polkit based stuff (suspend, hibernate, mount via gvfs etc.): ==
 
 
<span style="color:red;">Warning:</span> tested with lightdm on jessie only!
 
 
a) add wheezy repo to apt lists
 
# echo deb http://ftp.debian.org/debian/ wheezy main contrib non-free >/etc/apt/sources.list.d/wheezy.list
 
b) pin essential packages to wheezy
 
 
# echo -e '\n\nPackage: policykit-1\nPin: origin "wheezy"\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
 
# echo -e '\n\nPackage: libpolkit-*\nPin: origin "wheezy"\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
 
# echo -e '\n\nPackage: upower\nPin: origin "wheezy"\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
 
Note: for multiarch system you may need also to pin 64bit and i386 versions separately as mentioned above.
 
 
c) install polkit-1 with libs, upower and udisks (not udisks2!)
 
# apt-get update && apt-get install polkit-1 libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 upower udisks
 
 
d) install policykit authentication agent depending on what DE you use
 
 
for GNOME or XFCE4:
 
# apt-get install policykit-1-gnome
 
for MATE:
 
# apt-get install mate-polkit
 
for LXDE: (lxpolkit is already included to lxsession package)
 
 
e) reboot or restart your *dm service
 

Latest revision as of 20:40, 12 May 2019

contents of this page were more than a year old and, reputely, were no longer accurate.
(still available via the "history" of this page if you care to review them)

Please repost a known/tested accurate set of instructions here.

Personal tools