LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to uninstall a package? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-uninstall-a-package-794441/)

kryznic 03-10-2010 09:08 AM

How to uninstall a package?
 
I recently installed Splunk on my Fedora 12 machine. It is not working properly and I also don't like where I installed it which was in my downloads folder some how.

I cannot figure out how to uninstall this package and the Splunk Doc's are pretty weak.

Any help appreciated.

Thanks,

-Chris

MTK358 03-10-2010 09:11 AM

Did you install it using your package manager?

kryznic 03-10-2010 09:22 AM

To be honest I am not sure. I think I used the GUI install process (I am guessing that is the Package Installer) yes, I think I did use that.

kryznic 03-10-2010 09:27 AM

OK, I found where I can ADD/REMOVE software but I don't see Splunk in there. I may have installed it thru terminal because I vaguely remember that I didn't have access to install it thru the package installer. I do not know how to get root access that way, only in terminal. I think I need linux for dummies.

ronlau9 03-10-2010 09:30 AM

Quote:

Originally Posted by kryznic (Post 3892934)
To be honest I am not sure. I think I used the GUI install process (I am guessing that is the Package Installer) yes, I think I did use that.

If you use the package manager to install it than you also can use the package manager to uninstall it
But you can also do it from the cli as root
T obecome root type in the terminal su enter
root password enter
yum remove package name

arashi256 03-10-2010 09:30 AM

WHat do you see if you run "rpm -qi splunk"?

kryznic 03-10-2010 09:36 AM

Is there a way I can find out what the package name is?

MTK358 03-10-2010 09:42 AM

Try yum erase splunk.

arashi256 03-10-2010 09:45 AM

If you could choose where to install it - I very much doubt that you installed it using a package manager, which usually decides for itself where to install files.
*How* did you install the application? From source, using yum and an external repository or an .rpm file?

However, as I suggested earlier, if you installed a package on a RedHat-based system using rpm or yum, you should be able to query the RPM database for the package using "rpm -qi <package name>".

jamescondron 03-10-2010 09:45 AM

Lets see if we can work out exactly how you put it on there if the above don't work. At a terminal, see what comes out of
Code:

history| grep splunk
(We're hoping that you did do this in the terminal as you thought you may have done, in your post of 20minutes ago)

kryznic 03-10-2010 10:23 AM

Here is the outcome of that command. I did not install it today sooo....

[root@FedoraBox bin]# history | grep splunk
9 cd splunk
11 splunk start
12 ./splunk start
16 ./splunk start
19 ./splunk start
47 cd splunk
50 ./start splunk
51 ./splunk start
52 ./splunk display app all
53 ./splunk display app
80 /start splunk
81 ./start splunk
82 splunk
253 cd home/kryznic/Downloads/opt/splunk/bin
260 cd splunk/bin
262 ./start splunk
264 ./splunk
266 splunk
267 /.splunk
268 ./splunk
269 ./splunk cheatsheet
270 ./splunk help
271 ./splunk help simple
272 ./splunk help command
273 ./splunk help commands
275 ./splunk restart
285 splunk
286 /start splunk
287 ./start splunk
288 ./splunk
290 splunk restart
291 ./ splunk restart
292 ./splunk command
293 ./splunk help commands
294 ./splunk restart|splunkd
295 ./splunk restart splunkd
296 ./start splunkd
298 catg splunkd
299 splunkd
300 cd splunkd
301 /start splunk
302 splunk start
303 start splunk
304 ./start splunk
305 ./splunk start
306 yum update splunk
307 rpm --e splunk-2.1-0
308 userdel splunk
309 groupdel splunk
322 rpm -i splunk-4.0.9-74233.i386.rpm
323 rpm -u splunk-4.0.9-74233.i386.rpm
324 rpm -U splunk-4.0.9-74233.i386.rpm
327 cd opt/splunk/bin
328 ./splunk stop
329 rpm -e splunk-4.0.9-74233.i386.rpm
330 /.start splunk
331 ./start splunk
332 splunk
333 ./splunk stsart
334 ./start splunk
335 ./splunk start
336 rpm -ql splunk-4.0.9-74233.i386.rpm | grep bin
337 yum remove splunk-4.0.9-74233.i386.rpm
338 rpm remove splunk-4.0.9-74233.i386.rpm
339 rpm -e splunk-4.0.9-74233.i386.rpm
340 yum install splunk-4.0.9-74233.i386.rpm
342 yum erase splunk
343 history | grep splunk


Additionally RPM & YUM says

[root@FedoraBox bin]# rpm -e splunk-4.0.9-74233.i386.rpm
error: package splunk-4.0.9-74233.i386.rpm is not installed
[root@FedoraBox bin]# yum install splunk-4.0.9-74233.i386.rpm
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
No package splunk-4.0.9-74233.i386.rpm available.
Nothing to do


but I know something is installed because I can still run it.

Is linux really this confusing or am I just to used to Windows? (I know there are no similiarities)

jamescondron 03-10-2010 10:33 AM

I don't think you've actually installed it

arashi256 03-10-2010 10:34 AM

Try typing just "rpm -e splunk" omitting the version stuff.

arashi256 03-10-2010 10:35 AM

Quote:

Originally Posted by jamescondron (Post 3893018)
I don't think you've actually installed it

Well, we'd know for sure if I wasn't talking to myself and the OP had run "rpm -qi splunk" and told us the output...;)

jamescondron 03-10-2010 10:37 AM

Quite ;)

kryznic 03-10-2010 10:51 AM

Quote:

Originally Posted by arashi256 (Post 3893022)
Well, we'd know for sure if I wasn't talking to myself and the OP had run "rpm -qi splunk" and told us the output...;)

Sorry, I missed your post.


Ok so no package installed. But this app runs. So I guess certain apps can be "installed" and run without being an actual package?

What I need is to find all the files this intall has has placed on the machine, is there a easy way to search for a specific file name?

And thank you for all the replies. :)

jamescondron 03-10-2010 10:55 AM

Yes, you can run it, installing it puts it in a specific place you see so you don't have to navigate to the directory it is in. It also sets configuration files in certain places and so on, and so forth.

EDIT: Consider it as in Windows. You can run a standalone program easily. You can write a program easily. Installing it puts the program in a specific directory and adds it to the registry. It does the Linux equivalents here. You didn't install, you just ran it.

At the terminal type in
Code:

echo $PATH
These directories are where executables are saved to/moved to to enable you to just type in 'command' instead of doing the 'cd /command/path; ./command' dance you had to do.

But yes, type in
Code:

updatedb
locate *splunk*

to find it. Still, all you need to do is really delete than directory and its gone. Is there something thats making you think splunk has put something on there? Outside of this directory?

kryznic 03-10-2010 10:59 AM

Well I'm not exactly sure how splunk works on this machine. I wanted to un/re install it because it won't work anymore. It runs like a local web page type of thing and it can't start a service called 'splunkd' so I was assuming it installed this on the machine. I may just blow away this virtual machine and start fresh.

jamescondron 03-10-2010 11:03 AM

Personally, I'd make sure it wasn't running
Code:

ps aux|grep splunk
- If it was killing each instance

Then delete the directory, then install the package with yum. Easier than binning the whole thing.

arashi256 03-10-2010 11:04 AM

Since the http://www.splunk.com/download URL contains a splunk RPM, I'd simply delete the directory where you installed it (presumably from the .tgz file rather than the rpm package available on their website) download the rpm and install with: -

rpm -ivh splunk-4.0.9-74233.i386.rpm

Job done. You don't need to worry about where it installs it, as the package will sort that out for you. And it's easily uninstalled if you so choose with: -

rpm -e splunk-4.0.9-74233

..or with whatever the output from "rpm -qi splunk" returns.

arashi256 03-10-2010 11:05 AM

Quote:

Originally Posted by jamescondron (Post 3893059)
Personally, I'd make sure it wasn't running
Code:

ps aux|grep splunk
- If it was killing each instance

Then delete the directory, then install the package with yum. Easier than binning the whole thing.

Indeedy :D

Although splunk isn't available from Fedora's repos, as I've just checked...hence my recommendation to install via the rpm package available on their website.

kryznic 03-10-2010 11:22 AM

awesome thank you!

is there a way to be ROOT when I am trying to delete files or whatnot when using the GUI? Or must I be in Terminal?

MTK358 03-10-2010 11:39 AM

You can launch the GUI application from a root terminal.

arashi256 03-10-2010 11:47 AM

Since, from your bash_history, you seem to have installed splunk to: - /home/kryznic/Downloads/opt/splunk/bin, you can run: -

cd ~/Downloads
rm -rf opt

...assuming that 'opt' has nothing else but splunk in it, else cd ~/Downloads/opt and do the rm thing again.

CAUTION: Make sure you're in the right directory when you do this (run 'pwd' to find out where you are) - it will not prompt you for deleting files, nor will you be able to retrieve them from the GNOME trash can if you do this, that directory and everything below it will be gone for good.

kryznic 03-10-2010 12:20 PM

here's what I am attempting to do. I searched in the File Browser for files containing the word "splunk" I found many and want to delete them all but keeps telling me access denied. How can I gain access thru file browser?

Thanks fella's

arashi256 03-10-2010 12:46 PM

From the looks of it, all splunk files should be in the directory you specified, which I mentioned above. I highly caution you about deleting files randomly from all parts of the filesystem - you'll most likely cause your system to become unstable at best and non-functional at worst. WHat makes you think that splunk files have been installed all over your filesystem?

As mentioned above, you should be able to run the GNOME nautilus file manager from root by simply running "nautilus" from your root account, although personally I've never tried this.

kryznic 03-10-2010 01:51 PM

Quote:

Originally Posted by arashi256 (Post 3893185)
WHat makes you think that splunk files have been installed all over your filesystem?

This, and the fact that I still see files in other folders that are not located in the 'opt' folder.

[root@FedoraBox kryznic]# rpm -ivh splunk-4.0.9-74233.i386.rpm
warning: splunk-4.0.9-74233.i386.rpm: Header V3 DSA signature: NOKEY, key ID 653fb112
Preparing... ########################################### [100%]
package splunk-4.0.9-74233.i386 is already installed
[root@FedoraBox kryznic]#


I officially give up though, I am going to reinstall Fedora and start fresh. Thanks for all the help ;)

kryznic 03-10-2010 03:43 PM

well I dunno why, but I went into users and groups and found a splunk user, I deleted it and then ran rpm -ivh splunk-4.0.9-74233.i386.rpm and it re-installed splunk and now it works. That makes no sense to me.

Also, does rpm -ivh splunk-4.0.9-74233.i386.rpm actually install the package so that it could be removed through my package installer? I am still confused on how this works.

Thanks.

arashi256 03-10-2010 04:53 PM

Quote:

Originally Posted by kryznic (Post 3893387)
well I dunno why, but I went into users and groups and found a splunk user, I deleted it and then ran rpm -ivh splunk-4.0.9-74233.i386.rpm and it re-installed splunk and now it works. That makes no sense to me.

Also, does rpm -ivh splunk-4.0.9-74233.i386.rpm actually install the package so that it could be removed through my package installer? I am still confused on how this works.

Thanks.

Well, perhaps part of the check that RPM does to signify if splunk is installed is checking for the user for that application - since it was there, the new install failed, as it assumed correctly that splunk was already installed via another means.

As for packages, dude - you really need to read up on this stuff. It's not that hard. "man rpm" and "man yum" would be a good start and as they say, "Google is your friend" :) Anyhow - RPM -ivh is: -

i = install
v = verbose mode
h = show hash marks install progress

And yes, installing an RPM file via RPM adds this entry to the RPM database and because of this, allows you to uninstall it cleanly.

YUM is sorta a wrapper on top of RPM - it queries remote repositories of validated applications and installs them much like RPM files. One of the problems with RPM packages is that that RPM file might have dependencies that depend on other RPM packages, which you have to download manually and install first, the so-called "dependency hell". Yum handles this for you by downloading and installing any dependant packages from the remote repositories as well so you don't have to do it yourself. Always try "yum install <package name>" first. If it's not available in any of your remote repositories, them hunt down an RPM package file from the net and try that (and possibly any dependant RPM package files it needs). Lastly install from source using zipped source files. This usually allows various switches to the configure script to denote installation destination and various other things. You can then use make and make install to actually install the application. But this means you'll have to uninstall the application manaually, so make a note of where you installed it.
That's vaguely it anyways.

All this stuff can be researched on the net. Good luck.

kryznic 03-11-2010 08:18 AM

Arashi, thank you. Your right I do have to read up and I will be doing so. I just had a little panic attack here and I was getting frustrated working on this for the past few days. Thanks for everyone's help and patience. I leave this thread having gained some valuable linux info. :)

arashi256 03-11-2010 08:25 AM

No problem - glad I could help. Happy trails...:)


All times are GMT -5. The time now is 03:22 AM.