When deleting a user in ubuntu userdel, the following message is displayed: userdel: user ** is currently logged in ubuntu userdel: user ** is currently logged in: I just created a new git user this morning and switched to the git user for a long time. Finally, When I deleted the user account, I found a strange phenomenon: userdel: user newname is currently logged in many solutions on the Internet are as follows: mv/var/run/utmp/var/run/utmp_touch>/var/run/utmp about: /var/run/utmputmp is a file. You cannot edit this file except for the utmp program. If you delete this file, the current login information will be lost. This file will be re-created every time the machine is reboot. However, I still cannot try it myself. If I still get the same prompt, delete the user brute force: userdel-r-f XXXX: userdel: warning: can't remove/var/mail/git: No such file or directoryuserdel: git home directory (/home/git) not found does not matter. The user has been deleted successfully.