You can't delete an user if there are processes currently running as that user, which in the case of root, is always.
You could manually delete the entries in /etc/{passwd,shadow,group}, but
depending on the settings in /etc/nsswitch.conf, there might be alternate sources of the root account, so things will continue to work. If you then remove the alternate sources in /etc/nsswitch.conf so that only these files are used (by keeping only compat):
You can't delete an user if there are processes currently running as that user, which in the case of
root
, is always. You could manually delete the entries in/etc/{passwd,shadow,group}
, but depending on the settings in/etc/nsswitch.conf
, there might be alternate sources of the root account, so things will continue to work. If you then remove the alternate sources in/etc/nsswitch.conf
so that only these files are used (by keeping onlycompat
):Then things will start to break:
It might even lead to an unbootable system; you'll have to go back and fix with a live USB or single user mode.