Score:1

How to purge logstash

in flag

I need to purge logstash but as I try to run apt purge logstash I get an error:

root@vmi503579:~# apt purge logstash
^Citing for cache lock: Could not get lock /var/lib/dpkg/lock. It is held by process 2797938 (dpkg)... 20s

So I tried to find pid 2797938 which results in this

root@vmi503579:~# ps -x | grep 2797938
2797938 ?        Ss     0:00 /usr/bin/dpkg --status-fd 57 --no-triggers --force-depends --abort-after=1 --remove logstash:amd64

It was my previous attempt to stop logstash. So I try to kill process 2797938 and run purge logstash again. No success. Then I tried to kill all processes with keyword logstash. Then try to run apt purge logstash again

root@vmi503579:~# apt purge logstash
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

Now I am really lost. What should I do to fix it? Thanks for any help.

Score:1
zw flag

You have to follow error messages shown.

Use commands below:

sudo dpkg --configure -a
sudo apt-get install -f

And then remove logstash package by

sudo apt-get purge logstash
in flag
Hi, what is `apt-get install -f` ?
in flag
Ok -f means fix, But how much time can spend `apt purge logstash` command? I am waiting few minutes without any result.
in flag
Now one hour without any result. :(
in flag
In join with this thread https://discuss.elastic.co/t/can-not-purge-logstash/277225/3 I was able to remove the Logstash. Thanks you very much
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.