Results 1 to 6 of 6

Thread: How Do I Remove Files from opt?

  1. #1
    Join Date
    Jul 2010
    Beans
    13

    How Do I Remove Files from opt?

    I ran "install.sh" for a program and it put two new subfolders in my /opt folder. Now I've decided I don't want that program on my computer. How do I remove the subfolders it created?

    -TC

  2. #2
    Join Date
    Jan 2009
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How Do I Remove Files from opt?

    what is the program called?

  3. #3
    Join Date
    Mar 2008
    Location
    Central Valley, CA, USA
    Beans
    190
    Distro
    Ubuntu Studio 10.04 Lucid Lynx

    Re: How Do I Remove Files from opt?

    !!!CAUTION!!! Sudo can be an INCREDIBLY dangerous command. Use EXTREME care to follow ONLY the instructions listed below. Your files can be deleted, or worse, if you are not careful. YOU HAVE BEEN WARNED. !!!CAUTION!!!

    Okay, now that that's out of the way, assuming you know which folders were added, you would simply open a Run dialog (Alt+F2), type:
    Code:
    gksudo 'nautilus /opt'
    press enter, then enter your root password.

    From there, you have privs to remove ANY FOLDER on your system, hence the BOLD, RED caution notice above.

    If you don't know which folders were modified, simply order them by List View and check the Date Modified fields. Again, be VERY CAREFUL doing any of this.

    Once you're done, click the icon of a pair of keys on your panel (right-click on pre-10.04 systems), and select "Drop elevated priviliges".

    That should do the trick!
    Linux for Absolute Geniuses: Real Issues. Real Solutions.
    HP Pavilion dv8210us. Since 9.10, no longer such a struggle. Still worth it.

  4. #4
    Join Date
    Aug 2010
    Beans
    3

    Re: How Do I Remove Files from opt?

    Warning: Root (sudo) is extremely dangerous, and when used wrongly it can completely destroy your computer.

    It's fairly simple, to delete the folder run at your command prompt:

    replace subfolder1 and subfolder2 with the folders your want to delete

    Code:
    $ sudo rmdir /opt/subfolder1
    $ sudo rmdir /opt/subfolder2
    They will need to be empty. To do this run first:

    Code:
    $ sudo rm -R /opt/subfolder1/*
    $ sudo rm -R /opt/subfolder2/*
    Be VERY careful when combining sudo and rm (for remove), as some of the most dangerous commands are some of the most simple.

  5. #5
    Join Date
    Jul 2010
    Beans
    13

    Re: How Do I Remove Files from opt?

    Thanks for the replies.

    I actually knew about sudo and rmdir; I just didn't know that was the right thing to do.

    For me, the most confusing thing about Linux is not figuring out how to do things, but figuring out the right way to do things. The GUI offers several ways to install and uninstall programs, so it is not obvious to a beginner that removing folders manually with sudo and rmdir is the correct way to uninstall a program from opt.

    Drenriza, the program in this case is Second Life.


    -TC

  6. #6
    Join Date
    Jul 2009
    Location
    The Netherlands
    Beans
    30
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Question Re: How Do I Remove Files from opt? -- Manual stuff can be confusing..

    Quote Originally Posted by T C View Post
    .. For me, the most confusing thing about Linux is not figuring out how to do things, but figuring out the right way to do things. The GUI offers several ways to install and uninstall programs, so it is not obvious to a beginner that removing folders manually with sudo and rmdir is the correct way to uninstall a program from opt.

    Drenriza, the program in this case is Second Life.
    I agree with T C that it is sometimes unclear how to add/remove some application manually that is, without the software-center/synaptic/apt/.deb-files/etc.

    I came across this post while searching how (and if) to remove an install of Eclipse (an old version 3.4.2, instead of the 3.5.2 that is available now) from /opt . I must have installed it there myself over a year ago, but back then I was a bit overwhelmed with the Linux experience, so I couldn't trace back how I had it installed.

    Anyhow, I guess that just removing the /opt/eclipse directory is enough to erase any traces of the old version ..so I can start using the (already installed) new Eclipse version?
    Re-importing the workspace..

    If not, let me know pls. (sorry if this appears a topic hijack )

    Kind regards,
    Paul

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •