• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“userdel: user xxx is currently used by process yyy” – Unable to delete an User

by admin

The Problem

Unable to remove a user and userdel throws the below error:

# userdel -r username
userdel: user username is currently used by process xxx

The Solution

New child processes are being created every time the ‘userdel’ command is run and hence unable to remove the user.

You can use the below commands to forcefully remove the user.

# killall -TERM -u username
# userdel -f username

The -f would forcefully remove this user, including the user’s home directory/mail (if any). So, use this option only if you are aware of what gets removed for this specific user. When using -f option, you need not use the -r option.

Filed Under: Linux

Some more articles you might also be interested in …

  1. lvcreate Command Examples in Linux
  2. ansible-galaxy – Create and manage Ansible roles (Command Examples)
  3. mount Command Examples in Linux
  4. ethtool: command not found
  5. sed Command Examples in Linux
  6. How to Enable Disk Quotas on an XFS File System
  7. ps Command Examples in Linux
  8. ‘error opening class fc_host’ – systool Command Error on CentOS/RHEL 7 and 8
  9. mkfs.btrfs Command Examples in Linux
  10. virt-xml-validate Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • dillo: A lightweight web browser intended for slow computers
  • dig: DNS lookup utility
  • diffstat: Create a histogram from the output of the diff command
  • diffoscope: Compare files, archives, and directories

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright