5

As opposed to people who want to get rid of systemd, I want to completely and safely remove sysvinit.

I've been using Debian since Debian 7.0 (Wheezy). Currently I'm using Debian 9.0 (Stretch). During one of the system upgrades there was move from sysvinit to systemd.

systemd works fine for me, but I've noticed that system did not removed sysvinit completely.

  • Why?
  • How can I safely get rid off sysvinit?
  • Is it safe to remove remains of sysvinit by:

    aptitude purge initscripts sysvinit sysvinit-utils
    

    or alternatively:

    apt-get remove --purge initscripts sysvinit sysvinit-utils
    

BTW: AFAIK there is systemd-sysvcompat package (not installed) which probably somehow use sysvinit. I want to avoid problems which can be caused by removing remains of sysvinit which can be still somehow necessary for Debian.

patryk.beza
  • 1,179
  • 1
  • 13
  • 25
  • 1
    You can remove `sysvinit` but the other two packages are still priority `Required` and can not be removed. – jordanm Jul 06 '15 at 12:51
  • @jordanm Thanks, I had misread the documentation before reading your comment, I updated my answer based on this. – Michael Shaw Jul 06 '15 at 13:24

1 Answers1

3

Why?

Even though you can remove sysvinit a lot of system packages still rely on sysvinit style scripts.

How can I safely get rid off sysvinit?
Is it safe to remove remains of sysvinit by...

This depends on what you have installed on your system, if no system components depend on them then yes it is safe, apt will tell you. Note that you can use rdepends to check what depends on a package:

apt-cache rdepends initscripts sysvinit-utils sysvinit

If there is nothing you need printed as a dependency then removing them would be safe. This won't be the case!! You can do the removal as usual with apt-get remove.


Be aware that initscripts is not sysv specific, removing it will almost certainly destroy your system. See here

If you are to remove sysvinit the /etc/rc*.d directories will still be present. If you look at the debate on this page you can see that there are many packages which still have sysvinit style scripts. Even though the old sysvinit directories are used this is actually managed by systemd.

I'm not sure why you want to get rid of the last traces of sysvinit but I would say it's not time yet, you will likely run into trouble. To build a system with no traces of sysvinit you will probably have to build your own distro although somebody may have already done this.

Michael Shaw
  • 641
  • 3
  • 7
  • "I'm not sure why you want to get rid of the last traces of sysvinit but I would say it's not time yet": Is the long term plan to get rid of `sysvinit` completely? I would prefer to be able to choose between a configuration using only `systemd` and one using only `sysvinit`. In the same way as I can switch between `gnome`, `mate`, `kde`, and so on. Is this technically feasible? Is it planned? – Giorgio Dec 23 '15 at 09:02