[SOLVED] Where is all my disk space?
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] Where is all my disk space?
Hi all,
When I open my Disk Usage Analyser, the following picture is shown: As you see, it says I have 8.8GB available of my 53.4 GB allocated to this partition in total. I conclude from this, that 53.4 - 8.8 = 44.6 GB must be used up somewhere.
However, when I open mathieu-PC or the home folder, I get the following: This adds up to 14.1 + 5.5 = 19.6 GB.
Where are the other 44.6 - 19.6 = 25.0 GB? And may I be able to safely delete what's in there? (I'm pretty confident I am wasting unnecessary space somewhere, I just don't know where). Could this be the space that Linux Mint itself is taking up?
Thanks in advance!
Matt
When I open my Disk Usage Analyser, the following picture is shown: As you see, it says I have 8.8GB available of my 53.4 GB allocated to this partition in total. I conclude from this, that 53.4 - 8.8 = 44.6 GB must be used up somewhere.
However, when I open mathieu-PC or the home folder, I get the following: This adds up to 14.1 + 5.5 = 19.6 GB.
Where are the other 44.6 - 19.6 = 25.0 GB? And may I be able to safely delete what's in there? (I'm pretty confident I am wasting unnecessary space somewhere, I just don't know where). Could this be the space that Linux Mint itself is taking up?
Thanks in advance!
Matt
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Where is all my disk space?
Maybe this will help you How to Clean Linux Mint Safely.
A woman typing on a laptop with LM20.3 Cinnamon.
Re: Where is all my disk space?
Where are you saving Timeshift snapshots? Are you willing to try diagnosing this with Terminal commands?
Re: Where is all my disk space?
It is much easier to see details with the output of terminal command which will show the size of your partitions and how much of that space is used.
Code: Select all
df -hT
Re: Where is all my disk space?
I have tried most of the things indicated in the post you sent SMG, thanks. Unfortunately it didn't do much. In fact while I was using my PC, not downloading anything big, I "lost" another GB of storage, it now says I have 7.0 GB available.
ajgreeny, I have run this command and can't conclude much from it, but I've attached it in case that helps, thanks. (note that I now have my HDD attached and previously didn't, it's the Elements thing) linux-rox, yes I would be willing to diagnose via Terminal and would be super grateful for any guidance in that. I am currently saving my timeshifts on an external HDD, or so I think at least. I guess it's still possible that timeshift is the culprit and I am misunderstanding something. Thanks for that hint.
ajgreeny, I have run this command and can't conclude much from it, but I've attached it in case that helps, thanks. (note that I now have my HDD attached and previously didn't, it's the Elements thing) linux-rox, yes I would be willing to diagnose via Terminal and would be super grateful for any guidance in that. I am currently saving my timeshifts on an external HDD, or so I think at least. I guess it's still possible that timeshift is the culprit and I am misunderstanding something. Thanks for that hint.
Re: Where is all my disk space?
It could be a runaway log. Looking at the first image you posted, /var is quite large. My /var (which I never clean) is 1.9 GB and yours is 7.1 GB.
A woman typing on a laptop with LM20.3 Cinnamon.
Re: Where is all my disk space?
Notice df says the home partition is only 7 GB. Also that / has 44 GB used, which is huge if Timeshift snapshots are stored elsewhere. And, as SMG says, /var looks suspicious. Let's try a few different ways of getting at this:
Please use copy-and-paste for Terminal outputs, rather than screenshots. Place the output for each command in a separate code box (that's what the thing above is called). For each, type
Code: Select all
inxi -SMpo
sudo parted --list
sudo du -m -d 1 / | sort -n -r
sudo du -m -d 1 /var | sort -n -r
sudo du -m -d 1 /home | sort -n -r
[code]
, paste in from clipboard, then type [/code]
. Or you can copy in from clipboard, select with mouse, and click the </> button above the text entry window (which will automatically insert the code tags).-
- Level 8
- Posts: 2297
- Joined: Sat Sep 17, 2016 6:40 pm
- Location: England
Re: Where is all my disk space?
I just ran the commands linux-rox recommended. I had to abort the one for / (it didn't load, maybe it would have eventually?). Here's the output:
As far as I can tell, var/log is very modest in size with 56MB. Instead, /var/lib seems to be way too large and also /var/tmp given what you said about the typical size of /var SMG.
But also, I still don't understand where all the other space is? Is it not available because the home partition is too big and I could just make it smaller? Or are there files filling it up? Is that what you meant linux-rox?
Regarding Flatpak, cliffcoggin, as far as I can tell, it only takes up about 1GB. Or am I drawing the wrong conclusion from the following command.
Again, thanks to all of you for your help!
Code: Select all
(base) mathieu@mathieu-PC:~$ inxi -SMpo
System: Host: mathieu-PC Kernel: 5.4.0-37-generic x86_64 bits: 64 Desktop: Cinnamon 4.4.8
Distro: Linux Mint 19.3 Tricia
Machine: Type: Convertible System: ASUSTeK product: UX370UAR v: 1.0 serial: <root required>
Mobo: ASUSTeK model: UX370UAR v: 1.0 serial: <root required> UEFI: American Megatrends
v: UX370UAR.300 date: 09/07/2017
Partition: ID-1: / size: 49.73 GiB used: 43.25 GiB (87.0%) fs: ext4 dev: /dev/sda5
ID-2: /boot/efi size: 256.0 MiB used: 31.8 MiB (12.4%) fs: vfat dev: /dev/sda1
ID-3: /home size: 6.94 GiB used: 5.12 GiB (73.8%) fs: ext4 dev: /dev/sda6
ID-4: /media/mathieu/b69ce86b-607b-4a55-b4a6-4857ac1fac9c size: 86.01 GiB used: 40.62 GiB (47.2%)
fs: ext4 dev: /dev/sdb2
Unmounted: ID-1: /dev/sda2 size: 16.0 MiB fs: <root required> label: N/A uuid: N/A
ID-2: /dev/sda3 size: 179.66 GiB fs: ntfs label: N/A uuid: N/A
ID-3: /dev/sda4 size: 800.0 MiB fs: ntfs label: N/A uuid: 74C6E2E7C6E2A896
ID-4: /dev/sdb1 size: 843.59 GiB fs: ntfs label: Elements uuid: EEEE8C05EE8BC475
(base) mathieu@mathieu-PC:~$ sudo parted --list
Model: ATA SanDisk SD8SN8U2 (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition boot, esp
2 274MB 290MB 16,8MB Microsoft reserved partition msftres
3 290MB 193GB 193GB Basic data partition msftdata
5 193GB 248GB 54,4GB ext4
6 248GB 255GB 7642MB ext4
4 255GB 256GB 839MB ntfs Basic data partition hidden, diag
Model: WD Elements 2621 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 906GB 906GB ntfs Elements msftdata
2 906GB 1000GB 94,4GB ext4
(base) mathieu@mathieu-PC:~$ sudo du -m -d 1 / | sort -n -r
du: cannot read directory '/proc/1588/task/1588/net': Invalid argument
du: cannot read directory '/proc/1588/net': Invalid argument
du: cannot access '/proc/7531': No such file or directory
du: cannot access '/proc/7532': No such file or directory
du: cannot access '/proc/7533': No such file or directory
du: cannot access '/proc/7535': No such file or directory
du: cannot access '/proc/7536': No such file or directory
du: cannot access '/proc/7537': No such file or directory
du: cannot access '/proc/7538': No such file or directory
du: cannot access '/proc/7545/task/7545/fd/4': No such file or directory
du: cannot access '/proc/7545/task/7545/fdinfo/4': No such file or directory
du: cannot access '/proc/7545/fd/3': No such file or directory
du: cannot access '/proc/7545/fdinfo/3': No such file or directory
du: cannot access '/run/user/1000/gvfs': Permission denied
^C
(base) mathieu@mathieu-PC:~$ sudo du -m -d 1 /var | sort -n -r
8689 /var
6382 /var/lib
2094 /var/tmp
147 /var/cache
56 /var/log
12 /var/backups
1 /var/spool
1 /var/opt
1 /var/mail
1 /var/local
(base) mathieu@mathieu-PC:~$ sudo du -m -d 1 /home | sort -n -r
5208 /home/mathieu
5208 /home
1 /home/lost+found
But also, I still don't understand where all the other space is? Is it not available because the home partition is too big and I could just make it smaller? Or are there files filling it up? Is that what you meant linux-rox?
Regarding Flatpak, cliffcoggin, as far as I can tell, it only takes up about 1GB. Or am I drawing the wrong conclusion from the following command.
Code: Select all
(base) mathieu@mathieu-PC:~$ du -s --si /var/lib/flatpak/*/*
1,1G /var/lib/flatpak/app/com.jetbrains.PyCharm-Community
39M /var/lib/flatpak/appstream/flathub
8,2k /var/lib/flatpak/exports/bin
168k /var/lib/flatpak/exports/share
4,1k /var/lib/flatpak/repo/config
4,1k /var/lib/flatpak/repo/extensions
4,1k /var/lib/flatpak/repo/flathub.trustedkeys.gpg
5,2G /var/lib/flatpak/repo/objects
197k /var/lib/flatpak/repo/refs
4,1k /var/lib/flatpak/repo/state
5,2M /var/lib/flatpak/repo/tmp
12M /var/lib/flatpak/runtime/org.freedesktop.Platform
312k /var/lib/flatpak/runtime/org.freedesktop.Platform.GL.default
148k /var/lib/flatpak/runtime/org.freedesktop.Platform.html5-codecs
9,0M /var/lib/flatpak/runtime/org.freedesktop.Platform.Locale
3,4M /var/lib/flatpak/runtime/org.freedesktop.Platform.openh264
144k /var/lib/flatpak/runtime/org.freedesktop.Platform.VAAPI.Intel
24M /var/lib/flatpak/runtime/org.freedesktop.Sdk
9,1M /var/lib/flatpak/runtime/org.freedesktop.Sdk.Locale
58k /var/lib/flatpak/runtime/org.gtk.Gtk3theme.Mint-Y
Re: Where is all my disk space?
Just as an FYI, the latest 5.4.0 kernel is 5.4.0-70. Given your full root partition, I would not install any until the problem is sorted, but keep updating in mind for later.
System:
Host: mathieu-PC Kernel: 5.4.0-37-generic x86_64 bits: 64 Desktop: Cinnamon 4.4.8
Distro: Linux Mint 19.3 Tricia
Partition: ID-1: / size: 49.73 GiB used: 43.25 GiB (87.0%) fs: ext4 dev: /dev/sda5
ID-2: /boot/efi size: 256.0 MiB used: 31.8 MiB (12.4%) fs: vfat dev: /dev/sda1
ID-3: /home size: 6.94 GiB used: 5.12 GiB (73.8%) fs: ext4 dev: /dev/sda6
ID-4: /media/mathieu/b69ce86b-607b-4a55-b4a6-4857ac1fac9c size: 86.01 GiB used: 40.62 GiB (47.2%)
fs: ext4 dev: /dev/sdb2
System:
Host: mathieu-PC Kernel: 5.4.0-37-generic x86_64 bits: 64 Desktop: Cinnamon 4.4.8
Distro: Linux Mint 19.3 Tricia
I do not know what is "typical", but my install is a rather basic Mint install. (I do not have any flatpaks installed.)
Your /home is the tiniest I've ever seen. Normally, one would not have a separate /home if /home is not going to be larger in size than the root partition. Just make one larger root partition and not have a separate /home.
Partition: ID-1: / size: 49.73 GiB used: 43.25 GiB (87.0%) fs: ext4 dev: /dev/sda5
ID-2: /boot/efi size: 256.0 MiB used: 31.8 MiB (12.4%) fs: vfat dev: /dev/sda1
ID-3: /home size: 6.94 GiB used: 5.12 GiB (73.8%) fs: ext4 dev: /dev/sda6
ID-4: /media/mathieu/b69ce86b-607b-4a55-b4a6-4857ac1fac9c size: 86.01 GiB used: 40.62 GiB (47.2%)
fs: ext4 dev: /dev/sdb2
A woman typing on a laptop with LM20.3 Cinnamon.
Re: Where is all my disk space?
I agree with SMG, there was little advantage to splitting out /home to its own partition with so little space available. Unfortunately, lots of sources act like it's essential (it's not) and/or don't bother to discuss when it's not a good idea. Anyway, the good news for purposes of this thread is that we've answered the original question. The Devices & Locations screenshot does not reflect space which should be available on the home partition.
This still leaves the question of why / is so full. I'm puzzled the du command wouldn't run. Does the ^C mean you terminated the command? Try again, letting it squawk about the directories it can't read. When done, you should get a report which looks something like this:
That's a VirtualBox VM, with a basic as-installed system. I've omitted the /media folder (mostly shared from the internal hard drive) and /timeshift (which you're saving elsewhere). Those values are size in MB. So /var, for example, is 1435 MB or 1.435 GB.
Note: When you report the output, please copy only the lines with the folders and their size. Don't bother with the squawks, which will merely clutter up the report and aren't relevant to the inquiry.
This still leaves the question of why / is so full. I'm puzzled the du command wouldn't run. Does the ^C mean you terminated the command? Try again, letting it squawk about the directories it can't read. When done, you should get a report which looks something like this:
Code: Select all
5113 /usr
1435 /var
1394 /lib
839 /home
334 /boot
19 /sbin
19 /opt
16 /bin
15 /etc
2 /run
1 /tmp
1 /srv
1 /root
1 /mnt
1 /lost+found
1 /lib64
1 /cdrom
0 /sys
0 /proc
0 /dev
Note: When you report the output, please copy only the lines with the folders and their size. Don't bother with the squawks, which will merely clutter up the report and aren't relevant to the inquiry.
Re: Where is all my disk space?
Note that the du output for the root partition can take quite a long time to show, maybe a minute or two depending on your hardware.
Also I suggest that you use the -h option instead of the -m option; it makes the sizes of partitions much more easily readable to my eyes at least.
It's a minor point but try it, and wait until the terminal prompt returns in case du is still in action.
Also I suggest that you use the -h option instead of the -m option; it makes the sizes of partitions much more easily readable to my eyes at least.
Code: Select all
sudo du -h -d 1 / | sort -n -r
Re: Where is all my disk space?
That will include other partitions mounted under "/", namely it can easily give the wrong answer. It also returns the results in a weirdly unsorted order; here's what I got.ajgreeny wrote: ⤴Fri Apr 09, 2021 3:02 pm Also I suggest that you use the -h option instead of the -m option; it makes the sizes of partitions much more easily readable to my eyes at least.Code: Select all
sudo du -h -d 1 / | sort -n -r
Code: Select all
988K /run
252K /root
98G /
95G /mnt
50M /var
...
This command (-x = stay on partition):
Code: Select all
sudo du -xhd1 / | sort -h
Code: Select all
4.0K /lost+found
...
50M /var
3.7G /usr
3.8G /
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: Where is all my disk space?
Flippin heck!
I'd never noticed that before; it sorts on the numerical digits and ignores the letters indicating megabytes, M, gigabytes, G and kilobytes, K.
Thanks for that Flemur. I will stick with -m in future to keep everything in megabytes.
We learn something new every day!
I'd never noticed that before; it sorts on the numerical digits and ignores the letters indicating megabytes, M, gigabytes, G and kilobytes, K.
Thanks for that Flemur. I will stick with -m in future to keep everything in megabytes.
We learn something new every day!
Re: Where is all my disk space?
I also like Flemur's form of the command. Let's use that, mathieu. As a bonus, no squawks.
As we're sharing tips, this form of the df command strips out a lot of cruft:
By the way, I've formulated none of these, including the ones I gave above. I merely notice things of this sort in my travels and save the ones which seem useful.
As we're sharing tips, this form of the df command strips out a lot of cruft:
df -hT -x squashfs -x tmpfs -x devtmpfs
. By the way, I've formulated none of these, including the ones I gave above. I merely notice things of this sort in my travels and save the ones which seem useful.
Re: Where is all my disk space?
Big thanks to all of you for helping me here! It's so amazing to me that I can ask a question on a forum and people I've never met will answer me, just to help out. I mean it when I say you have my fullest admiration.
Given all that I know now (that I should never have separated / and /home, that something somewhere is wrong with my var folder and others and that my root is generally way bigger than expected etc.), I've decided to just delete and reinstall linux-mint. I'll save a back-up, just in case. I think it will be cleaner. I don't have much on here anyway (yet! ).
I'm super glad you guys found the answer to that original question.
You are right linux-rox and ajgreeny: I had interrupted the du command via keyboard, bc it wouldn't load, but when I gave it more time, it did.
FYI, here's what I get with Flemur's command:
Given all that I know now (that I should never have separated / and /home, that something somewhere is wrong with my var folder and others and that my root is generally way bigger than expected etc.), I've decided to just delete and reinstall linux-mint. I'll save a back-up, just in case. I think it will be cleaner. I don't have much on here anyway (yet! ).
I'm super glad you guys found the answer to that original question.
You are right linux-rox and ajgreeny: I had interrupted the du command via keyboard, bc it wouldn't load, but when I gave it more time, it did.
FYI, here's what I get with Flemur's command:
Code: Select all
(base) mathieu@mathieu-PC:~$ sudo du -xhd1 / | sort -h
[sudo] password for mathieu:
4,0K /cdrom
4,0K /lib64
4,0K /mnt
4,0K /opt
4,0K /srv
16K /lost+found
32K /timeshift
40K /media
524K /tmp
15M /etc
16M /bin
19M /sbin
164M /boot
869M /lib
4,3G /usr
8,7G /var
29G /root
44G /
Re: [SOLVED] Where is all my disk space?
FYI, here's the answer to the mystery:
That's the home folder of user root, not to be confused with the root directory (which is /). Normally, /root has almost nothing in it. My guess would be that you deleted a bunch of stuff as root and it ended up in /root's trash bin (/root/.local/share/Trash).
Code: Select all
29G /root
Re: [SOLVED] Where is all my disk space?
@mathieu, you can empty root's trash withlinux-rox wrote: ⤴Sun Apr 11, 2021 11:16 pm That's the home folder of user root, not to be confused with the root directory (which is /). Normally, /root has almost nothing in it. My guess would be that you deleted a bunch of stuff as root and it ended up in /root's trash bin (/root/.local/share/Trash).
trash-cli
. Install it with Synaptic Package Manager. Terminal command trash-list
lists files in the trash for logged in user, command sudo trash-list
lists files in root's trash. Command trash-empty
empties logged in user's trash, sudo trash-empty
empties root's trash. Read man trash
.Regards, Jože