I am a newbie and have a Ubuntu 20.04lts dual booted with windows 8.1 pro on

ssd and hdd
SanDisk SSD i100 24GB (11.56.04)
WDC WD5000LPVX-22V0TT0 (01.01A01)(500gb)

as you see my SSD size is small so I created a partition of 20gb for the root and mounted it on / and the rest of the free space i used it as a swap area(4 gb),

and then created a partition on my hdd of about 100gb and mounted it on /home

now the problem is that all the updates and software's I download via the terminal or Ubuntu store gets installed on the root and not on my home partition which is reducing my space on the SSD.

So what should I do so that only the OS stays on the root and the rest of the software's and updates get shifted/installed on the HDD rather than on the SSD

please tell a detailed method as I read a few articles about it and I am not able to guess what to do .i am afraid that i might not do anything that might corrupt my files

pls use the below devices name

hdd-    /dev/sda6   ,    mounted at -"/home"     ,    uuid-92dda774-f971-494a-a3ed-a4c7faeed5b8 
ssd-    /dev/sdb2   ,   mounted at -"Filesystem Root" , uuid-b302b753-d77e-47fd-9aaf-173edfc7ad6f
pwd-    "/home/lakshya"

also on the computer in the other location menu,can i just shift the /home/lakshya folder to my hdd or delete it?as i can access it in the files won't it be easier to do so

  • guys pls help me
    – lakshya
    May 15, 2020 at 11:11
  • You are making two classic new-user mistakes: 1) You don't get to easily decide where deb-based software installs to - that's coded into the package. 2) You don't need a separate swap partition - the Ubuntu installer's default is to create a swapfile in /var. Whether 24GB is too small depends upon what you want to install.
    – user535733
    May 15, 2020 at 12:16
  • no i still have about 12 gb free space left on it,i am just worried as when i download new softwares or updates the size reduces and you know new updates/patches are going to come later ,so if i install a larger game on it ,it is going to fill up the ssd
    – lakshya
    May 15, 2020 at 14:41
  • Updated packages replace older packages, so use very little additional space.
    – user535733
    May 15, 2020 at 15:00
  • @lakshya so your question is moot. You will NEVER EVER install 12Gb in software from the repositories. Software is counted in Mb not Gb. Updates will take up kb's as they replace software. Or heck it is totally possible for an update to remove code making it smaller.
    – Rinzwind
    May 15, 2020 at 16:54

1 Answer 1


How to change default download directory to /home rather than root

Impossible (mind that I assume you meant "installation of software" and not "download") as /home/ does not store installed software unless you switch to installing software from source and never use the software store. If you do that I would suggest using /opt/ as a mount point (as that makes the software available to all users and not just your user).

now the problem is that all the updates and software I download via the terminal or Ubuntu store gets installed on the root and not on my home partition which is reducing my space on the SSD.

These are 2 different issues:

  • The download is kept in a cache directory (/var/cache/apt/archives/). You can delete the contents of that directory to save up space (see for instance var/cache/apt/archives occupying huge space ).

    That cache can get large so removing those files might make the next part of this obsolete.

  • The installation of the download goes into several directories that reside in / (the main 3 are /usr/, /var/, and /etc/; more on that below) so it is impossible to move those locations to something like a /home/.

    In the old days to separate installed software we would create a mount point for /usr/ (software mostly goes to this directory) and for /var/ (location for log files, websites, mysql database) and /etc/ (configuration files). But even then that came with a warning to keep them on the same disk: if the hdd is too slow during boot when the system expects /usr/ and /var/ to be available you have a broken boot.

    So to do what you are asking you would need to create a mount point for /usr/ on the hdd. If you do that my advice would be to install ALL of Ubuntu on the HDD if you believe 20Gb is not enough and live with the fact booting is going to be a bit slower than when it would be done from the sdd.

Personal note:

SSD size is small so I created a partition of 20gb for the root

I have never ever needed more than 15Gb for root and I do things with my system you might not do (like coding websites, and converting databases).

  • so if i donot use the terminal and the ubuntu store ,and download .deb package from the browser and then set the default download location on the /home will it help
    – lakshya
    May 15, 2020 at 11:30
  • also is the download folder in the the /home or in the root as when i open other location>computer>home>lakshya>downloads,so when i put something in the /home it will also consume the root memory too.what do you think about it
    – lakshya
    May 15, 2020 at 11:41
  • 1. No. deb's will abide by the directory structure of Linux. You need to install from source if you want to set your own installation path 2. That location is for personal downloads. Like when you download something using a browser. And that location is on the hdd. Not the sdd.
    – Rinzwind
    May 15, 2020 at 13:18
  • you mean from the source code(like i have to use github for it)
    – lakshya
    May 15, 2020 at 14:46
  • also could you tell me a software that can compress the root like in windows ,or a disk cleaup tool
    – lakshya
    May 15, 2020 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .