How do I change Software Center's default installation path?

Solution 1:

Debian/Ubuntu use a standard directory hierarchy. The command man hier will describe this for you. It is common for packages to create symlinks to place files in the correct place when the program expects them elsewhere.

There are two options I use to increase space on a partition: - As a temporary solution I create a directory on another partition for a directory like /var/cache/apt/archives which can take a fair amount of space. I then move the contents of the directory to the new partition and replace the directory with a sumlink.
- A permenant solution is to create a new partition for a large moveable directory like home, var or usr. Then I rsync the directory onto the new partition and mount it. Cleanup is done by mounting the root partition on /mnt and removing the files from the directory under /mnt.

Cleaning up /tmp and moving it to a tmpfs mount can free up space if it is on disk.

You may also free up space with the apt autoclean or apt clean commands. The second option will remove all download debs for /var/cache/apt/archives.

Running apt and removing obsolete kernels may also free up space. Usually two are sufficient, and they don't always get removed automatically. Don't remove the current kernel. If you haven't rebooted for a long time you may want to reboot to the newest kernel before removing old kernels.

The command du -sk /usr /home /var | sort -n will tell you how large those directory trees are.

Solution 2:

There is no facility to change the installation structure. They are hard-coded in the installation packages. What you can do is find a way to increase the size of your root partition. You can do this if you boot with your Ubuntu installation CD.

If you can provide the output of the command

sudo fdisk -l

we might be able to help on how to resize.

Solution 3:

The installation path is a standard location and cannot be changed. If you have another drive that has space, you can move any amount of your files to that drive by mounting your big directories at partitions on that drive (this is easiest to do when you are first installing Ubuntu). It's usually a good idea to move your /home directory to a different partition/drive rather than trying to move your OS files.

Detailed instructions can be found here: https://help.ubuntu.com/community/Partitioning/Home/Moving