Cannot Delete User
10,505
Solution 1
First simply remove entire dir /opt/logstash sudo rm -rf /opt/logstash/
and then try to remove logstash with sudo apt-get remove logstash
Solution 2
Try the following :
in terminal type : w
then see after the username an output like this : pts/2
now type :
fuser -k /dev/pts/2
This should kick the user, now try to delete it
Related videos on Youtube
Author by
Binyomin Trager
Updated on September 18, 2022Comments
-
Binyomin Trager over 1 year
I am trying to uninstall logstash, but
sudo apt-get remove logstash
fails because the user is being used by a process. If I try to manually delete thelogstash
user, I cannot because even when I kill the process, a new one immediately pops up. For example, if I check for processes usinglogstash
:ps -fp $(pgrep -u logstash)
I get
UID PID PPID C STIME TTY TIME CMD logstash 17376 1 99 10:04 ? 00:00:10 /usr/bin/java -Djava.io.tmpdir=/
Then I try to kill the process and delete the user:
sudo killall -KILL -u logstash sudo userdel logstash
But now
logstash
is already being used by another process:userdel: user logstash is currently used by process 17794
How can I delete the
logstash
user? -
Binyomin Trager about 10 yearsThank you for your response. I only see my username with a
pts/1
after it, and my username again withtty7
after it. When I dofuser -k /dev/pts/1
it just closes my terminal, but the logstash user is still being used. -
nux about 10 yearsare you logging in with same user you want to delete ?
-
Binyomin Trager about 10 yearsI don't think so... I am logged in as myself
btrager
and I am trying to deletelogstash
. -
nux about 10 yearsreboot your pc then try again
-
Binyomin Trager about 10 yearsWhen I try
lsof | grep logstash
, and kill the process, I have the same problem that a new one starts immediately after I kill it. -
Binyomin Trager almost 10 yearsThat one finally worked. Thanks! If you could give a little more explanation I would appreciate it, and others might benefit from it as well.