2

I frequently get low disk space warning while I have 1.4TB on /media directory. I assume I need to add this space to /home. How can I do it without loosing my already installed packages? Here is my current disk space status after running:

$ df -h -x{tmp,devtmp,squash}fs:

Filesystem      Size  Used Avail Use% Mounted on
udev             16G     0   16G   0% /dev
tmpfs           3.2G  9.4M  3.2G   1% /run
/dev/sda6       178G  168G 1022M 100% /
tmpfs            16G  265M   16G   2% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/loop0       89M   89M     0 100% /snap/core/7270
/dev/loop1       92M   92M     0 100% /snap/vectr/2
/dev/loop2      298M  298M     0 100% /snap/pycharm-community/132
/dev/loop3       89M   89M     0 100% /snap/core/7169
/dev/loop4      298M  298M     0 100% /snap/pycharm-community/128
tmpfs           3.2G   68K  3.2G   1% /run/user/1000
/dev/sdb2       466G  1.3G  465G   1% /media/mfani/Win_Data_Drv
/dev/sdb1       1.4T  179G  1.1T  14% /media/mfani/72f334b0-29a3-4f81-a52f-ed30de1ca5a01
terdon
  • 104,119
Mehr
  • 23

1 Answers1

4

The problem is that your /, the root of the filesystem, is at 100%. The extra space you have on other partitions, such as /media, isn't relevant here. The system is installed on / and that's the one that needs more space.

Since you do have loads of space on /media, the easiest solution is to find things in your $HOME that are taking a lot of space and move those to /media. For example, if you have video, music or image files, perhaps in the directories $HOME/Videos, $HOME/Music and $HOME/Pictures, move them to /media/mfani/72f334b0-29a3-4f81-a52f-ed30de1ca5a01 and then create symlinks in your $HOME pointing to their new locations:

cd $HOME
for dir in Videos Music Pictures; do
    mv "$dir" /media/mfani/72f334b0-29a3-4f81-a52f-ed30de1ca5a01/
    ln -s /media/mfani/72f334b0-29a3-4f81-a52f-ed30de1ca5a01/"$dir" . 
done

You will now have symlinks in your $HOME which will take up no space but which you can use to access your files as though they hadn't been moved.

terdon
  • 104,119