1

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.

Peng Zhang
  • 1,565
  • 2
    What do you think about solution like this one Reorganize partitions with HDD and SSD? – user.dz Jan 23 '14 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 '14 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 '14 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 '14 at 11:37
  • @Rinzwind, I am not such expert, but is possible to make symbolic link for /usr/share or any other big non-critical folder to move it some where in /home..? – user.dz Jan 23 '14 at 11:38
  • 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 '14 at 11:39
  • @Rinzwind No. Win7 is installed on some partition of my harddrive. Win7 is going to eat up 20G easily on its own. – Peng Zhang Jan 23 '14 at 11:43
  • Move everything to the HDD, checks that it boots, then enable bcache. – Gabriel Jan 24 '14 at 17:45

1 Answers1

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).
Rinzwind
  • 299,756