• 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. CentOS/RHEL: How to find the package with a missing file using YUM
  2. Beginners Guide to Automounting File Systems in CentOS / RHEL
  3. How to convert text files to all upper or lower case
  4. RHEL 7 – RHCSA Notes – System documentation including man, info, and files in /usr/share/doc
  5. How to Create Disk Partitions using cfdisk
  6. “mdadm: No arrays found in config file” – error on running ‘mdadm –assemble –scan’
  7. CentOS / RHEL : How to setup session idle timeout (inactivity timeout) for ssh auto logout
  8. fuser Command Examples in Linux
  9. Xen Hypervisor (xm) command Cheat Sheet
  10. CentOS / RHEL 6 : how to start the services interactively during boot (to disable/abort some services)

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright