Deployment Architecture
Highlighted

Uninstall Splunk on Linux

Communicator

In the guide for uninstalling Splunk from Linux, it says; "rpm -e splunkproductname".
What is meant by, "splunkproductname"? Is that the name of the installed file?
I installed using the wget URL. So would the command be, "rpm -e splunk-6.1.1-207789-Linux-x86_64.tgz"?
Also, what directory should this command be executed from?

-Thank you

Tags (3)
0 Karma
Highlighted

Re: Uninstall Splunk on Linux

SplunkTrust
SplunkTrust

Run the following command to find the correct package name.

rpm -q -a | grep -i splunk

Pass the result to the rpm -e command.

---
If this reply helps you, an upvote would be appreciated.
Highlighted

Re: Uninstall Splunk on Linux

Communicator

If the above command returns no result then a manual uninstall must done. Yes?

0 Karma
Highlighted

Re: Uninstall Splunk on Linux

SplunkTrust
SplunkTrust

If you get no results from the rpm command then it probably means Splunk was not installed using rpm. You would then need to uninstall it manually.

---
If this reply helps you, an upvote would be appreciated.
0 Karma
Highlighted

Re: Uninstall Splunk on Linux

Explorer

rpm -qa | grep -i splunk
Then put the command rpm -e abovecommandresult
Example : rpm -e splunkforwarder-6.3.2-aaff59bb082c.x86_64

Highlighted

Re: Uninstall Splunk on Linux

Path Finder

It does not work for me. When I run it I get a bunch of errors and the /opt/splunk/ path is still there:

warning: file /opt/splunk/share/splunk/searchmrsparkle/modules.new/messaging/Message.conf: remove failed: No such file or directory
warning: file /opt/splunk/share/splunk/search
mrsparkle/modules.new/messaging: remove failed: No such file or directory
warning: file /opt/splunk/share/splunk/searchmrsparkle/modules.new/DispatchingModule.js: remove failed: No such file or directory
warning: file /opt/splunk/share/splunk/search
mrsparkle/modules.new/DispatchingModule.conf: remove failed: No such file or directory
warning: file /opt/splunk/share/splunk/searchmrsparkle/modules.new/AbstractModule.js: remove failed: No such file or directory
warning: file /opt/splunk/share/splunk/search
mrsparkle/modules.new/AbstractModule.conf: remove failed: No such file or directory
warning: file /opt/splunk/share/splunk/search_mrsparkle/modules.new: remove failed: No such file or directory
warning: file /opt/splunk/ftr: remove failed: No such file or directory

0 Karma
Highlighted

Re: Uninstall Splunk on Linux

Motivator

Hi

It is warning that there are some files which are not part of that rpm package. Basically you should remove those after uninstall by rm -fr /opt/splunk.

Also remember possible volumes and/or SPLUNK_DB -directory if those are somewhere else than /opt/splunk/var/lib

Btw. It’s better to use yum remove splunk than rpm -e if yum is in use. Pure rpm can generate som lock issues to rpm db.

Ismo

0 Karma
Highlighted

Re: Uninstall Splunk on Linux

Motivator

Agree with @soutamo , yum remove is always better practice, if available on your distro.

0 Karma