Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7942045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:50:55+00:00 2026-06-03T23:50:55+00:00

The default install directory of apt-get is /opt. Can I change it to another

  • 0

The default install directory of apt-get is /opt.
Can I change it to another directory?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:50:57+00:00Added an answer on June 3, 2026 at 11:50 pm

    Best way I can think of is to use a symbolic link

    note that not all programmes are installed to the same directory and /opt may not be the best thing to move. (see end for example of moving only one folder/program)

    This is what I did with EasyPeasy (Ubuntu 10.04)

    Follow this code carefully some of the commands can delete important files if used incorrectly.

    First you need to make sure /opt (or your distros default apt-get install directory) is empty. If you have data in the opt folder, which you most likely do, you can move it to somewhere else first for safe keeping:

    sudo mkdir /New_Location/newtmp                                      # Generates Temporary Folder for Programs 
    sudo cp -a /opt/* /New_Location/newtmp                               # Moves Programs to Temp folder
    

    Once backed up you can remove the original directory:

    sudo rm -rf /opt/                                                    # Removes opt directory
    

    You can then create your new Program Files folder in a drive with lots of space and create a symbolic link:

    sudo mkdir /New_Location/Program-Files                               # Generates New Program Directory
    sudo ln -s /New_Location/Program-Files /opt                          # Creates Symbolic Link
    

    Finally move all your old program files to your new folder and clean up the temporary data:

    sudo cp -a /New_Location/newtmp/* /New_Location/Program-Files        # Moves Programs to Program Files Folder 
    sudo rm -rf /New_Location/newtmp/                                    # Removes Temp folder
    

    If you only wanted to move a single program which is taking up a hunk of your space you could use the same process.

    eg:
    to move Java (JVM approx 300MB) do the following.
    check directory of java using disk usage analyser.
    mine is /usr/lib/jvm

    sudo mkdir /New_Location/Program-Files/Java                          # Generates New Program Directory
    sudo cp -a /usr/lib/jvm/* /New_Location/Program-Files/Java            # Moves Program to new folder
    sudo rm -rf /usr/lib/jvm                                             # Removes opt directory
    sudo ln -s /New_Location/Program-Files/Java /usr/lib/jvm             # Creates Symbolic Link
    

    Its best at this point to do a restart which should clear the cache.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to install a vendor package onto a non-default directory (say /opt). By
By default, vundle install vim plugins to ~/.vim/bundle/ on linux machine. How can I
I did install the libnfc 1.5.1 in the default directory (/usr/loca/ lib). if i
I want to install my virtual directory other than the default location(c:\inetpub\wwwroot). I want
I tried rake gems:install but I get No such file or directory - /Users/macuser/Sites/hq_channel/config/database.yml
Can SDL Tridion, by default, talk to the active directory based on the domain
By default pip installs editable packages into src subdirectory of the directory where Python
Do the following on the default Python install on Mac OS X 10.5 (Leopard)
I want to install the Tridion 2011 Default Templates using the Template Builder. I
If you install multiple versions of python (I currently have the default 2.5, installed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.