Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I do not want packages to be installed under /. (sudo apt-get install ...).

The reason why I need to do this is that:

My '/' is mounted with my SSD(16GB) and my hard disk(500GB) is mounted at '/home'.

I have already installed my Ubuntu 12.04 on that SSD. There is not much free space under '/' now.

share|improve this question
2  
What do you think about solution like this one Reorganize partitions with HDD and SSD? –  Sneetsher Jan 23 at 11:13
2  
By the way: my notebook has the same setup and my SSD (120Gb) is not filled with 10Gb and never has been over 10Gb. Maybe you should try and see if you can find files that need to be on that disc (like temp files or a trash). –  Rinzwind Jan 23 at 11:19
1  
@Sneetsher Thanks. I have to be very conservative on re-partition, as the Ubuntu and Win7 take up all my disk. –  Peng Zhang Jan 23 at 11:22
    
You have both windows and ubuntu on that SSD? Mind you: if you install Ubuntu on less than 10Gb you are -never- going to fix this and should get some space from the windows part on the ssd. –  Rinzwind Jan 23 at 11:37
2  
Yes. But consider that a temporary solution. For the long run it will get messy if you keep using that method. –  Rinzwind Jan 23 at 11:39
show 3 more comments

1 Answer 1

You can not do that with sudo apt-get install.

Either...

  • Get a bigger disc.
  • If the disc has more operating systems re-partition such that Ubuntu has at least 10Gb. Ubuntu works perfectly fine with 10Gb. I have never even reached that (and I use both apache and mysql on my system where mysql does not use my ssd for the databases ;) )
  • Re-install your system such that the directories where software is installed are mounted on the other (500Gb) disc (like /home is mounted in your 2nd disc you can also mount /etc/, /bin/ on that disc).
  • Install all software manually from source. But this will not help when installing the base system and all its default software.

Alternative:

  • you could also switch to another operating system. Redhat has an option (--relocate) in their package system where you can set where to install. So does Gentoo (prefix; but entoo installs from source so this is not a package manager).
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.