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.
You have to follow error messages shown.
Use commands below:
And then remove
logstash
package by