TechSpot

uninstalling a program

By gsgleason
Sep 22, 2003
  1. 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?
     
  2. Phantasm66

    Phantasm66 TS Rookie Posts: 6,504   +6

    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.
     
  3. Nodsu

    Nodsu TS Rookie Posts: 9,431

    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.
     
  4. Phantasm66

    Phantasm66 TS Rookie Posts: 6,504   +6


    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.
     
  5. gsgleason

    gsgleason TS Rookie Topic Starter Posts: 53

    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.
     
  6. gsgleason

    gsgleason TS Rookie Topic Starter Posts: 53

    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:
     
  7. Mictlantecuhtli

    Mictlantecuhtli TS Evangelist Posts: 4,919   +9

    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).
    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>'.
    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.
    Installs the package, ie. copies necessary files to proper directories, usually under /usr/local.
    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).
    That's how it usually is in the beginning :)
     
  8. gsgleason

    gsgleason TS Rookie Topic Starter Posts: 53

    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?
     
  9. Mictlantecuhtli

    Mictlantecuhtli TS Evangelist Posts: 4,919   +9

    They're not necessary unless the application has an option "make uninstall" and you want to remove the application properly in the future.
     
  10. Nodsu

    Nodsu TS Rookie Posts: 9,431

    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.
     
  11. gsgleason

    gsgleason TS Rookie Topic Starter Posts: 53

    What is a tarball?
     
     
  12. Nodsu

    Nodsu TS Rookie Posts: 9,431

    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.
     
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.