Uninstalling programs installed to /opt

Discussion in 'all things UNIX' started by Ocky, Feb 4, 2009.

Thread Status:
Not open for further replies.
  1. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,677
    Location:
    George, S.Africa
    As they cannot be uninstalled in the usual way by using apt, or in this case, rpm
    commands, can one simply delete the program directory ?

    Eg. I have installed both sun jre 1.6.0_11 and now the latest jre 1.6.0_12 in /opt
    (on CentOS). My browser links for Firefox and Opera point to the new version.

    I assume that, bar the links, the jre installs mentioned are self-contained
    in their respective directories in /opt, and that I can safely delete the older
    version.

    Please advise whether this is OK or not. Thanks and regards.

    EDIT: I am talking about .bin files. i.e. files that cannot be installed with the package managers.
     
    Last edited: Feb 4, 2009
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,702
    Hello,
    You can check by running find or locate java and see what comes up.
    Furthermore, in general, you can delete the files, but you may have a few broken links here and there. /opt usually goes for local installs.
    Mrk
     
  3. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,677
    Location:
    George, S.Africa
    All's OK, but is there a way to remove the obsolete entry in /usr/bin/alternatives
    (i.e the jre1.6.0_11) ?
    [root@localhost /]# usr/sbin/alternatives --config java

    There are 3 programs which provide 'java'.

    Selection Command
    -----------------------------------------------
    * 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
    2 /opt/jre1.6.0_11/bin/java
    + 3 /usr/java/jre1.6.0_12/bin/java

    Enter to keep the current selection[+], or type selection number:
    [root@localhost /]#

    The version the browsers are using =

    [root@localhost /]# java -version
    java version "1.6.0_12"
    Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
    Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)
    [root@localhost /]#

    I suppose I could just leave as is ?
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,702
    Looks messy ... just leave it ...
    Mrk
     
  5. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,677
    Location:
    George, S.Africa
    OK. No probs. with java, so will leave as is. I could of course just have left
    the older version installed as well - as a functioning 3rd. alternative.
    Thanks.
     
Loading...
Thread Status:
Not open for further replies.