I have very little space left on my main hard drive (the one that I installed Ubuntu on) and need to install apps from the software center to another disk like in Windows XP. How can I proceed in doing this?


In Linux all files are organized into a single tree so there's no notion of "other drive" as in Windows. Your partitions are mounted into that tree as directories, so basically the problems boils down to moving files to another directory, while making the system think the files are still in their original location.

To achieve that, you can replace any directory with a symlink to another directory, possibly on another partition:

mv /some/dir /mnt/otherdisk/some/dir
ln -s /mnt/otherdisk/some/dir /some/dir

the only tricky part is that non-root partitions may be mounted later in the boot process than the program is needed which is now located on that partition, so you need to exercise common sense when doing that.

Alternatively, you can mount some root directories, say, /home, /opt, /var to another partition.

You can also resize the root partition to make it bigger.

Before doing anything drastic though - have you deleted old kernels, apt cache and other cruft which accumulates over time recently? You may find that you're not that short on space.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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