How do i check what files are almost filling a partition

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Level 2
Level 2
Posts: 51
Joined: Sun Jan 25, 2015 8:21 pm

How do i check what files are almost filling a partition

Post by colski »

I am new to linux and don't fully understand file and disk structure very much.

When I installed Linux Mint I put a few directories onto different partitions as I read somewhere that this was a bit safer to help avoid data loss etc.

Anyway, I can't understand why my / partition is almost full. I can't see what files are filling up this partition and whether I need to delete them or make the partition larger. I didn't realise LinuxMint took up so much space.

I have two hardrives and Linux is mounted on the first one.

Here is the output from a lsblk

Code: Select all

sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0  48.8G  0 part /
├─sda2   8:2    0 195.3G  0 part /home
├─sda3   8:3    0  97.7G  0 part /extra
├─sda5   8:5    0  15.6G  0 part [SWAP]
└─sda6   8:6    0  19.5G  0 part 
sdb      8:16   0 931.5G  0 disk 
└─sdb1   8:17   0 931.5G  0 part 
sr0     11:0    1  1024M  0 rom 

Here is the output from df -h

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           798M  1.4M  796M   1% /run
/dev/sda1        48G   41G  4.8G  90% /
tmpfs           3.9G  155M  3.8G   4% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda2       192G   27G  156G  15% /home
/dev/sda3        96G   61M   91G   1% /extra
tmpfs           798M   28K  798M   1% /run/user/1000

As you can see /dev/sda1 is almost full. How can I list the files and/or see what is taking up so much space in this partition?

Thank you.
User avatar
Level 22
Level 22
Posts: 15765
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)

Re: How do i check what files are almost filling a partition

Post by Pjotr »

Probably Timeshift snapshots and/or Flatpaks (those are the usual suspects). Try these safe cleaning actions:
https://easylinuxtipsproject.blogspot.c ... -mint.html
Tip: 10 things to do after installing Linux Mint 20 Ulyana
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
All in all, horse sense simply makes sense.
Level 20
Level 20
Posts: 10230
Joined: Tue Feb 03, 2009 10:27 am

Re: How do i check what files are almost filling a partition

Post by altair4 »

Install ncdu:

Code: Select all

sudo apt install ncdu
Run it with the -x option ( to exclude mount points to other partitions ) against /:

Code: Select all

ncdu -x /
It's interactive.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Post Reply

Return to “Newbie Questions”