userdel: user vivek is currently used by process 749 error and fix on Linux

This error message occurs when you try to delete a user account that is still being used by a running process. To resolve this issue, you need to first identify the process using the user account and then stop it before deleting the user account.

Here is the process to resolve the error:

  1. Identify the process using the user account:

    • Run the following command to list all processes running under the user account:
       
      ps -u vivek
    • Replace “vivek” with the name of the user account you want to delete.
  2. Stop the process:

    • Identify the process ID (PID) of the process and then stop it using the following command:
       
      kill -9 PID
    • Replace “PID” with the actual process ID.
  3. Delete the user account:

    • Finally, run the following command to delete the user account:
       
      userdel vivek
    • Replace “vivek” with the name of the user account you want to delete.

Now the user account should be deleted successfully.

(hikeaddicts)

Leave a Comment