This episode guides migrating from Debian to Devuan: switching apt sources to deb.devuan.org, removing systemd packages, adapting packages that depend on systemd with elogind and init scripts, then switching to sysvinit safely.

Many Devuan users don't install from scratch — they migrate from an already-running Debian. Episode 18 walks through the process step by step: switching apt sources to deb.devuan.org, removing systemd packages, adapting packages that depend on it, and switching to Devuan's init safely.
Migration isn't risk-free, so the golden rule is: back up the system first (episode 16) and don't migrate a production machine without testing. This process is safest on a virtual machine you can roll back.
The first step is pointing all apt sources at the Devuan repositories. Replace deb.debian.org and other Debian servers with deb.devuan.org:
sudo sed -i 's/deb.debian.org/deb.devuan.org/g' /etc/apt/sources.list
sudo sed -i 's/security.debian.org/deb.devuan.org/g' /etc/apt/sources.listsed -i 's/deb.debian.org/deb.devuan.org/g' replaces every occurrence globally. For deb822-based systems, do the same on the files in /etc/apt/sources.list.d/. Check the result:
cat /etc/apt/sources.list
apt-cache policyapt-cache policy shows the active repositories — make sure none still point to Debian.
Devuan's repositories are signed with different keys than Debian's:
sudo apt update
sudo apt install devuan-keyring
sudo apt-get updatedevuan-keyring provides the gpg keys for verifying packages. If the first apt update complains about unknown keys, run apt-get update after the keyring is installed — both steps are required.
Before removing anything, look at packages that depend on systemd:
apt list --installed | grep -i systemd
apt-cache rdepends systemd | head -30This list shows what will be affected. Most packages have an init alternative or can run without systemd once the configuration is adjusted.
Remove the systemd packages along with their init symlinks:
sudo apt-get remove --purge systemd systemd-sysv
sudo apt-get autoremoveapt-get remove --purge systemd systemd-sysv removes systemd and swaps the default init to sysvinit, provided by the sysvinit-core package. After autoremove, verify:
ps -p 1 -o comm=
apt list --installed | grep -i systemd || echo "bersih"The output of ps -p 1 -o comm= should show init. If any systemd packages remain, remove them one by one with apt-get remove --purge.
Desktop packages like GNOME and KDE depend on logind features. Devuan's solution is elogind (episodes 2 and 8) and replacement init scripts provided by Devuan packages:
sudo apt install elogind dbus
sudo service elogind startsudo service elogind start starts the session manager. For services that previously used systemd units, Devuan provides init scripts — check with service --status-all after the migration.
Some packages like firewalld are tightly bound to systemd. If no init alternative exists, your options are replacing it with an equivalent tool (for example nftables from episode 13) or holding its version. Document these exceptions — some can be resolved by applications as init support evolves.
Before rebooting, make sure sysvinit and its configuration are complete:
dpkg -l sysvinit-core
ls /etc/rc2.d/ | headdpkg -l sysvinit-core confirms the init package is installed. The /etc/rcN.d/ directory must contain service symlinks. If it's empty, run update-rc.d for essential services like ssh and cron.
The right time to reboot:
sudo reboot
ps -p 1 -o comm=
runlevelAfter reboot, ps -p 1 -o comm= should show init and runlevel should show the multi-user runlevel. If the system fails to boot, use rescue mode from the ISO (episode 16) to get in and repair.
Episode 18 guided the migration from Debian to Devuan: switching apt sources to deb.devuan.org, installing devuan-keyring, purging systemd packages, adapting systemd-dependent packages through elogind and init scripts, then rebooting with sysvinit.
Key takeaways:
In the next episode, episode 19, we'll cover virtualization and containers — QEMU/libvirt with virt-manager, KVM, and LXC, plus Docker and Podman in non-systemd and rootless modes on Devuan.