Cannot delete user - running '/usr/sbin/userdel' failed: Child process exited with code 16

  1. Ensure that the user is logged out of any active sessions.
  2. After doing above, close the 'Users Accounts' window and open it again in 'Systems Settings'

If the above did not work run userdel [username]. If thqt doesn't work it'll likely be because your user account is used by some process. The error message will give you a process ID (PID).

userdel: user [username] is currently used by process [PID]

From this, you can figure out what process it is by using ps -p [PID].

  PID TTY          TIME CMD
 1742 ?        00:00:09 ruby

Once you're happy you can terminate the process, run pkill or kill to kill it.

sudo pkill ruby

Run userdel [username] again and this time it should work.