Can not purge Logstash

Hi, can somebody help me please to remove logstash from Ubuntu? I had a broken Elastic + Kibana + Logstash + Filebeat installtion so I decided to remove it completely and start installation again. All packages are gone only Logstash remaining. I can not purge it away. This is what I see about 15 minutes.

root@vmi503579:~# apt-get purge logstash
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  logstash*
0 upgraded, 0 newly installed, 1 to remove and 109 not upgraded.
After this operation, 625 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 118295 files and directories currently installed.)
Removing logstash (1:7.13.2-1) ...

As I try to list running processes related to logstash in another terminal get this

root@vmi503579:~# ps -x | grep logstash
3276623 pts/0    S+     0:05 apt-get purge logstash
3276643 pts/1    Ss+    0:00 /usr/bin/dpkg --status-fd 57 --no-triggers --force-depends --abort-after=1 --remove logstash:amd64
3276644 pts/1    S+     0:00 /bin/sh /var/lib/dpkg/info/logstash.prerm remove
3276645 pts/1    S+     0:00 systemctl stop logstash

Is there something else what has to be stopped or removed before Logstash purge?

Thank you.

That looks like it is trying to stop the logstash service and it is hanging doing so. If you cannot stop the service I would suggest disabling it and rebooting. The system should then come up without logstash and apt-get should not feel the need to stop it.

1 Like

In join with this thread I was able to remove Logstash. Thank you very much.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.