Uninstalling a program

Status
Not open for further replies.

gsgleason

Posts: 18   +0
When one uninstalls an rpm, I read that one uses the rpm command and option -e.

Should I be in the directory where I originally saved the rpm? I installed AIM and want to remove it. I renamed the rpm /root/downloads/aim.rpm before I ran the install. From /root/downlods/ can I type rpm -e aim.rpm to remove it?
 
nope, you can uninstall it from anywhere.

rpm -e packagename

I usually query it first:

rpm -q packagename

you don't need the .rpm extension, as well I think.
 
Removal from RPM database has nothing to do with the original RPM file. You just query with rpm -q to make sure you are uninstalling the right thing and then do rpm -e. And yes, the rpm extension (and maybe also a big part of the RPM file name) is not needed, actually it will not work.
 
Originally posted by Nodsu
Removal from RPM database has nothing to do with the original RPM file.


Yes, that's entirely correct.


BUT, just as an aside, I believe that if you have installed from pure source code (you'd know, believe me, you'd have downloaded a tar.gz file and ran ./configure, make, make install, etc) that you can run "make uinstall" from inside the original source code folder in order to uninstall, so in that similar case the original files DO have relevance.

But not for RPMs. You just uninstall them with the command line -e flag.
 
I actually have downloaded some tar.gz files for flashplayer plugin for mozilla, and some other things, but I don't know what to do with them.
 
for instance, here's linux headquarters instructins for installing GAIM.

tar -xvzf gaim-0.10.3.tar.gz
cd gaim-0.10.3
./configure
make
make install

Is that all I have to type? I would like to understand what I'm actually doing, and not just blindly type commands.

When you uncompress a tar.gz file, does it matter where you extract the contents? When I did it with MozillaFirebird, and the flash player plugin, it make a new directory in the directory I was in. I was in /root/dls (my downloads directory) and when I ran the tar -xvzf command, it put it in /root/dls/MozillaFirebird. I would imagine I don't want the program files in /root

is there a linux equivalent of a "program files" directory, like in windows? Should I have been in a different working diretory when I uncompressed that tar.gz file?

I have so many questions!! Linux is befuddling to a newb. :confused:
 
Originally posted by gsgleason
tar -xvzf gaim-0.10.3.tar.gz
Uncompresses package. Uses tar's internal gunzip ability, another way would be gunzip gaim-0.10.3.tar.gz and then tar xfv gaim-0.10.3.tar. Unix packages are often compressed so that first files are packed together without compression using tar (tape archiver), then compressed using gzip or bzip2 (better compression).
cd gaim-0.10.3
Goes to gaim-0.10.3 directory. Hint: If you want to know where you are, set the prompt to show your current directory by setting prompt variable to $PWD like this: export PS1='$PWD>'.
./configure
Prepares the source code for compiling. You can check options and other parameters with ./configure --help. The reason for using ./ in the beginning is that Unix doesn't check the current directory for commands by default, only directories defined in $PATH environment variable.
Compiles the package - "makes" the executable out of the source code.
make install
Installs the package, ie. copies necessary files to proper directories, usually under /usr/local.
When you uncompress a tar.gz file, does it matter where you extract the contents? When I did it with MozillaFirebird, and the flash player plugin, it make a new directory in the directory I was in. I was in /root/dls (my downloads directory) and when I ran the tar -xvzf command, it put it in /root/dls/MozillaFirebird. I would imagine I don't want the program files in /root

is there a linux equivalent of a "program files" directory, like in windows? Should I have been in a different working diretory when I uncompressed that tar.gz file?
tar zxfv uncompresses files to the current directory. There's not really an equivalent for Program Files, but I'd say the closest would be /usr. In the end, it's up to you where you stack your files. Just remember if you're root and install apps to /root, then common users can't access them (access is denied to /root).
I have so many questions!! Linux is befuddling to a newb.
That's how it usually is in the beginning :)
 
so once I uncompress it and configure and make it and all that, and it puts stuff in /usr/local or wherever, are the contents of the directory to which I originally uncompressed the tar.gz file now not needed?
 
They're not necessary unless the application has an option "make uninstall" and you want to remove the application properly in the future.
 
Actually, unless you customise the make procedure yourself, you can remove the application later on by extracting the tarball and running "make uninstall".

So removing the directory is OK, it is a good idea to leave the tarball somewhere though.
 
A tarball is a common way of distributing files in the Unix world. It is usually a directory concatenated into a tar file and then compressed with either compress, gzip or bzip2. These are the .tar.gz, .tgz, .tar.bz2, tar.z etc. files.
 
Status
Not open for further replies.
Back