Running out of space

Quick to answer questions about finding your way around Linux Mint as a new user.
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.
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Running out of space

Post by jamesofyorkshire »

Hi.

I keep getting a message on start-up saying I'm running low on disc space. When I 'examine' it, there is a 'var' folder taking up a LOT of space.....like 50gb. Within that is a 'tmp' folder that I presume is a temp folder? And therefore I should be able to empty it.....but I can't find a way to do that. That 'tmp' folder seems to be the main culprit for taking up space.

I cleared my 'downloads' folder etc. to remove as much as I can so I don't know what's taking up the disc space on my PC apart from that 'var' folder.....and I don't know what that is!

Any help/advice much appreciated.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gm10

Re: Running out of space

Post by gm10 »

jamesofyorkshire wrote: Sun Nov 25, 2018 4:07 am I keep getting a message on start-up saying I'm running low on disc space. When I 'examine' it, there is a 'var' folder taking up a LOT of space.....like 50gb. Within that is a 'tmp' folder that I presume is a temp folder? And therefore I should be able to empty it.....but I can't find a way to do that. That 'tmp' folder seems to be the main culprit for taking up space.
Run these in a terminal window and post the output please:

Code: Select all

ll /var/tmp
sudo du /var/* -sht 100M
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1374
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Running out of space

Post by ricardogroetaers »

If you are not sure what to remove, I suggest using a program for this.
I use bleachbit:
For the newer version, go to:
https://www.bleachbit.org/
or install an older version present in the Mint repositories by Synaptic.

In the blachbit, I suggest not selecting:
- APT (do this by Synaptic)
- System:
. memory -> this is experimental
. free disk space -> very time consuming
. languages -> do not forget to check the languages you want to preserve in the initial settings

Good luck.
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

james2@james-HP-Pro-3420-AiO-PC ~ $ ll /var/tmp
total 424
drwxrwxrwt 106 root root 4096 Nov 25 09:44 ./
drwxr-xr-x 12 root root 4096 Nov 24 2017 ../
drwxr-xr-x 3 ma ma 4096 Oct 29 10:13 flatpak-cache-0B0MRZ/
drwxr-xr-x 2 ma ma 4096 Sep 22 14:28 flatpak-cache-0HENPZ/
drwxr-xr-x 3 ma ma 4096 Oct 29 10:37 flatpak-cache-0THWRZ/
drwxr-xr-x 2 ma ma 4096 Nov 18 07:53 flatpak-cache-0V1USZ/
drwxr-xr-x 3 ma ma 4096 Oct 30 13:28 flatpak-cache-0WLQRZ/
drwxr-xr-x 2 ma ma 4096 Oct 12 15:16 flatpak-cache-1G34QZ/
drwxr-xr-x 2 ma ma 4096 Nov 12 12:04 flatpak-cache-1HPESZ/
drwxr-xr-x 2 james james 4096 Sep 12 06:15 flatpak-cache-1UJFPZ/
drwxr-xr-x 3 ma ma 4096 Oct 31 12:56 flatpak-cache-246ORZ/
drwxr-xr-x 3 ma ma 4096 Nov 1 07:26 flatpak-cache-2KIMRZ/
drwxr-xr-x 3 ma ma 4096 Oct 30 07:16 flatpak-cache-2M1IRZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 14:20 flatpak-cache-2MJERZ/
drwxr-xr-x 2 ma ma 4096 Oct 26 07:32 flatpak-cache-3BFORZ/
drwxr-xr-x 3 ma ma 4096 Nov 12 10:54 flatpak-cache-3UQ2RZ/
drwxr-xr-x 3 ma ma 4096 Oct 29 19:48 flatpak-cache-41BSRZ/
drwxr-xr-x 2 james james 4096 Feb 19 2018 flatpak-cache-42JDEZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 19:14 flatpak-cache-49AERZ/
drwxr-xr-x 3 ma ma 4096 Oct 29 09:07 flatpak-cache-6F4SRZ/
drwxr-xr-x 3 ma ma 4096 Nov 24 08:19 flatpak-cache-6GYXSZ/
drwxr-xr-x 2 ma ma 4096 Nov 13 14:37 flatpak-cache-6NFJSZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 11:41 flatpak-cache-71KERZ/
drwxr-xr-x 3 james james 4096 Apr 24 2018 flatpak-cache-7JTOHZ/
drwxr-xr-x 3 ma ma 4096 Nov 25 09:18 flatpak-cache-85RNSZ/
drwxr-xr-x 3 ma ma 4096 Oct 30 15:34 flatpak-cache-8CMLRZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 09:41 flatpak-cache-8J0ORZ/
drwxr-xr-x 2 ma ma 4096 Jun 21 14:38 flatpak-cache-8T01KZ/
drwxr-xr-x 3 ma ma 4096 Nov 15 07:12 flatpak-cache-8X6FSZ/
drwxr-xr-x 2 ma ma 4096 May 20 2018 flatpak-cache-9MPCJZ/
drwxr-xr-x 2 ma ma 4096 Apr 28 2018 flatpak-cache-ACEJIZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 15:58 flatpak-cache-ARCVRZ/
drwxr-xr-x 2 ma ma 4096 Apr 26 2018 flatpak-cache-B0X6HZ/
drwxr-xr-x 3 ma ma 4096 Nov 1 17:50 flatpak-cache-B67IRZ/
drwxr-xr-x 2 ma ma 4096 Jun 8 19:49 flatpak-cache-B770JZ/
drwxr-xr-x 2 james2 james2 4096 Nov 24 06:29 flatpak-cache-BEY0SZ/
drwxr-xr-x 2 james james 4096 Aug 10 14:10 flatpak-cache-CASANZ/
drwxr-xr-x 2 ma ma 4096 Sep 5 07:30 flatpak-cache-CZ5TOZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 15:38 flatpak-cache-D95QRZ/
drwxr-xr-x 3 ma ma 4096 Nov 17 07:49 flatpak-cache-DMVKSZ/
drwxr-xr-x 2 james james 4096 Feb 19 2018 flatpak-cache-E3VREZ/
drwxr-xr-x 2 ma ma 4096 Aug 18 06:48 flatpak-cache-EAD7NZ/
drwxr-xr-x 3 ma ma 4096 Oct 26 16:51 flatpak-cache-EAWXRZ/
drwxr-xr-x 2 ma ma 4096 Aug 30 14:28 flatpak-cache-EBMJOZ/
drwxr-xr-x 2 ma ma 4096 May 14 2018 flatpak-cache-EXI1IZ/
drwxr-xr-x 2 ma ma 4096 Apr 24 2018 flatpak-cache-EY3OHZ/
drwxr-xr-x 3 ma ma 4096 Oct 29 12:27 flatpak-cache-F6TGRZ/
drwxr-xr-x 2 ma ma 4096 May 9 2018 flatpak-cache-FELYIZ/
drwxr-xr-x 3 ma ma 4096 Oct 29 17:27 flatpak-cache-GL0TRZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 13:21 flatpak-cache-GXWTRZ/
drwxr-xr-x 3 ma ma 4096 Oct 27 20:31 flatpak-cache-HY5XRZ/
drwxr-xr-x 3 ma ma 4096 Nov 24 06:25 flatpak-cache-I78VSZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 09:56 flatpak-cache-IKQQRZ/
drwxr-xr-x 2 ma ma 4096 Sep 16 12:55 flatpak-cache-IQH6OZ/
drwxr-xr-x 3 james james 4096 Nov 12 11:08 flatpak-cache-ITCCSZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 16:17 flatpak-cache-IWZTRZ/
drwxr-xr-x 2 ma ma 4096 Jul 4 07:15 flatpak-cache-J2MQLZ/
drwxr-xr-x 3 ma ma 4096 Oct 27 07:43 flatpak-cache-JH8KRZ/
drwxr-xr-x 3 ma ma 4096 Nov 12 11:16 flatpak-cache-JHQ4RZ/
drwxr-xr-x 2 james2 james2 4096 Nov 23 06:49 flatpak-cache-KD02SZ/
drwxr-xr-x 2 ma ma 4096 Sep 15 14:31 flatpak-cache-LGY2OZ/
drwxr-xr-x 3 ma ma 4096 Oct 31 19:15 flatpak-cache-LXJIRZ/
drwxr-xr-x 3 ma ma 4096 Nov 1 19:58 flatpak-cache-MNNIRZ/
drwxr-xr-x 2 james james 4096 Feb 19 2018 flatpak-cache-MVR9DZ/
drwxr-xr-x 3 ma ma 4096 Oct 31 07:11 flatpak-cache-N5NURZ/
drwxr-xr-x 2 ma ma 4096 Jun 4 20:14 flatpak-cache-NFXHKZ/
drwxr-xr-x 3 ma ma 4096 Nov 2 07:05 flatpak-cache-NSMMRZ/
drwxr-xr-x 2 ma ma 4096 Nov 20 17:16 flatpak-cache-NY27SZ/
drwxr-xr-x 3 ma ma 4096 Oct 31 14:45 flatpak-cache-OEASRZ/
drwxr-xr-x 3 ma ma 4096 Oct 28 07:05 flatpak-cache-OH6KRZ/
drwxr-xr-x 2 ma ma 4096 Aug 8 06:30 flatpak-cache-OZVBNZ/
drwxr-xr-x 2 james2 james2 4096 Nov 17 07:49 flatpak-cache-PTZKSZ/
drwxr-xr-x 3 ma ma 4096 Nov 2 20:37 flatpak-cache-QD9VRZ/
drwxr-xr-x 2 james2 james2 4096 Nov 24 08:20 flatpak-cache-QLC2SZ/
drwxr-xr-x 3 ma ma 4096 Oct 31 09:47 flatpak-cache-QRMSRZ/
drwxr-xr-x 2 ma ma 4096 May 23 2018 flatpak-cache-R4NIJZ/
drwxr-xr-x 2 james2 james2 4096 Nov 15 07:15 flatpak-cache-R7G2RZ/
drwxr-xr-x 3 ma ma 4096 Nov 1 08:29 flatpak-cache-R8UTRZ/
drwxr-xr-x 3 ma ma 4096 Oct 31 16:22 flatpak-cache-RE4FRZ/
drwxr-xr-x 2 ma ma 4096 Jun 15 06:12 flatpak-cache-RGDIKZ/
drwxr-xr-x 3 ma ma 4096 Sep 12 06:12 flatpak-cache-S2VDPZ/
drwxr-xr-x 2 james james 4096 Nov 12 11:32 flatpak-cache-ST26RZ/
drwxr-xr-x 2 ma ma 4096 Nov 19 12:53 flatpak-cache-SZPVSZ/
drwxr-xr-x 3 ma ma 4096 Nov 1 15:33 flatpak-cache-TH8LRZ/
drwxr-xr-x 2 ma ma 4096 Nov 21 19:12 flatpak-cache-TO6XSZ/
drwxr-xr-x 3 ma ma 4096 Oct 29 06:56 flatpak-cache-UBUDRZ/
drwxr-xr-x 2 ma ma 4096 Nov 16 07:38 flatpak-cache-UEEDSZ/
drwxr-xr-x 2 ma ma 4096 May 25 2018 flatpak-cache-UUFPJZ/
drwxr-xr-x 3 ma ma 4096 Oct 27 11:16 flatpak-cache-VUSSRZ/
drwxr-xr-x 3 ma ma 4096 Oct 29 14:48 flatpak-cache-W8KYRZ/
drwxr-xr-x 2 ma ma 4096 May 1 2018 flatpak-cache-WMCDIZ/
drwxr-xr-x 3 ma ma 4096 Oct 26 15:03 flatpak-cache-X0TIRZ/
drwxr-xr-x 3 ma ma 4096 Nov 23 06:47 flatpak-cache-XUL6SZ/
drwxr-xr-x 3 ma ma 4096 Oct 30 16:44 flatpak-cache-YC4VRZ/
drwxr-xr-x 3 james2 james2 4096 Nov 25 09:44 flatpak-cache-YJKZSZ/
drwxr-xr-x 2 ma ma 4096 Jun 29 15:12 flatpak-cache-YKFQLZ/
drwxr-xr-x 2 james james 4096 Apr 24 2018 flatpak-cache-Z5FFHZ/
drwxr-xr-x 2 ma ma 4096 Oct 2 07:28 flatpak-cache-ZAVDQZ/
drwx------ 3 root root 4096 Nov 25 09:17 systemd-private-35bf97ee52454b1f996d1c6451158180-colord.service-f6bKVP/
drwx------ 3 root root 4096 Nov 25 09:17 systemd-private-35bf97ee52454b1f996d1c6451158180-rtkit-daemon.service-1fqKfi/
drwx------ 3 root root 4096 Aug 20 20:08 systemd-private-6546fe96108c446e9bcd41da31a7446d-colord.service-Y93jgR/
drwx------ 3 root root 4096 Aug 20 20:08 systemd-private-6546fe96108c446e9bcd41da31a7446d-rtkit-daemon.service-66h2jq/
drwx------ 3 root root 4096 Oct 12 20:33 systemd-private-e143b8f589d243f5a01b69e2345b0541-colord.service-nQ5oJH/
drwx------ 3 root root 4096 Oct 12 20:33 systemd-private-e143b8f589d243f5a01b69e2345b0541-rtkit-daemon.service-dc1red/
drwx------ 3 root root 4096 Aug 23 16:18 systemd-private-fba77bdfb4614084bcdfc5b6c2554218-colord.service-2yszwK/
drwx------ 3 root root 4096 Aug 23 16:18 systemd-private-fba77bdfb4614084bcdfc5b6c2554218-rtkit-daemon.service-IbpiKf/
james2@james-HP-Pro-3420-AiO-PC ~ $ sudo du /var/* -sht 100M
gm10

Re: Running out of space

Post by gm10 »

There's nothing big in /var/tmp. What made you think it had 50GB? However, are you sure there was no output to the following command?
jamesofyorkshire wrote: Sun Nov 25, 2018 6:02 am james2@james-HP-Pro-3420-AiO-PC ~ $ sudo du /var/* -sht 100M
There should be something in /var/lib if nothing else. What Mint version are you using (post output of inxi -S if you're not sure)?

Run it again like this please:

Code: Select all

sudo du /var -sh
sudo du /var/* -sh
If /var has 50 GB I would expect it to be in /var/log by the way.
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Running out of space

Post by jimallyn »

Regarding Bleachbit, there are many here who recommend against using Bleachbit. Some call it a "software wrecking ball." YMMV
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

GM10


james@james-HP-Pro-3420-AiO-PC ~ $ sudo du /var/* -sht 100M
[sudo] password for james:
3.4G /var/cache
4.6G /var/lib
24G /var/tmp
Last edited by jamesofyorkshire on Mon Nov 26, 2018 3:23 am, edited 1 time in total.
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

I shall refrain from using Beachbit. I generally don't use anything I'm not familiar with.
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

GM10

james@james-HP-Pro-3420-AiO-PC ~ $ inxi -S
System: Host: james-HP-Pro-3420-AiO-PC Kernel: 4.10.0-38-generic x86_64 (64 bit)
Desktop: Cinnamon 3.6.6 Distro: Linux Mint 18.3 Sylvia
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

GM10

james@james-HP-Pro-3420-AiO-PC ~ $ sudo du /var/* -sht 100M
[sudo] password for james:
3.4G /var/cache
4.6G /var/lib
24G /var/tmp
james@james-HP-Pro-3420-AiO-PC ~ $ inxi -S
System: Host: james-HP-Pro-3420-AiO-PC Kernel: 4.10.0-38-generic x86_64 (64 bit)
Desktop: Cinnamon 3.6.6 Distro: Linux Mint 18.3 Sylvia
james@james-HP-Pro-3420-AiO-PC ~ $ sudo du /var -sh
32G /var
james@james-HP-Pro-3420-AiO-PC ~ $ sudo du /var/* -sh
gm10

Re: Running out of space

Post by gm10 »

jamesofyorkshire wrote: Mon Nov 26, 2018 3:20 am james@james-HP-Pro-3420-AiO-PC ~ $ sudo du /var/* -sht 100M
[sudo] password for james:
3.4G /var/cache
4.6G /var/lib
24G /var/tmp
Ah, so you hadn't given me the output last time, I had been wondering why it hadn't output anything. Ok first run these two (they won't produce output):

Code: Select all

apt clean
sudo rm -r /var/tmp/flatpak-cache* /var/tmp/systemd-private*
Then post the output of this, I want to see what hidden files you got in there taking up so much space (if we just blind delete them they might come back to haunt you again later):

Code: Select all

ls -la /var/tmp
PS: Also do another

Code: Select all

sudo du /var/cache -sh
to see how much we cleaned out of that with the first command.
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

james@james-HP-Pro-3420-AiO-PC ~ $ apt clean
james@james-HP-Pro-3420-AiO-PC ~ $ sudo rm -r /var/tmp/flatpak-cache* /var/tmp/systemd-private*
james@james-HP-Pro-3420-AiO-PC ~ $ ls -la /var/tmp
total 8
drwxrwxrwt 2 root root 4096 Nov 26 09:45 .
drwxr-xr-x 12 root root 4096 Nov 24 2017 ..
james@james-HP-Pro-3420-AiO-PC ~ $ sudo du /var/cache -sh
74M /var/cache
james@james-HP-Pro-3420-AiO-PC ~ $
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

Thanks GM10. Looks like you've freed up about 30gb for me!

What is the var folder and how does it get so full?
gm10

Re: Running out of space

Post by gm10 »

jamesofyorkshire wrote: Mon Nov 26, 2018 5:52 amWhat is the var folder and how does it get so full?
Apparently it was the flatpak cache that took up all the space. I hadn't expected that. A quick search however shows that it's a known issue that flatpak doesn't clean up after itself, in particular on failed or interrupted downloads: https://github.com/flatpak/flatpak/issues/1119

As to the first part of your question, see here for an overview https://en.wikipedia.org/wiki/Filesyste ... y_Standard
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

Thanks again GM10.

James
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

What is this flatpak? Do I need it? Can I remove it?
gm10

Re: Running out of space

Post by gm10 »

It's a software source and container format integrated into Software Manager. Check if you're using it for any apps at the moment:

Code: Select all

flatpak list
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

I'm away from that PC for a few days. I'll post the output when I'm next there.
ajgringo619

Re: Running out of space

Post by ajgringo619 »

gm10 wrote: Mon Nov 26, 2018 6:02 am
jamesofyorkshire wrote: Mon Nov 26, 2018 5:52 amWhat is the var folder and how does it get so full?
Apparently it was the flatpak cache that took up all the space. I hadn't expected that. A quick search however shows that it's a known issue that flatpak doesn't clean up after itself, in particular on failed or interrupted downloads: https://github.com/flatpak/flatpak/issues/1119

As to the first part of your question, see here for an overview https://en.wikipedia.org/wiki/Filesyste ... y_Standard
That was a seriously nasty bug. Thankfully it's been fixed (in the PPA version; on 1.0.6 now)
jamesofyorkshire
Level 2
Level 2
Posts: 73
Joined: Mon Mar 07, 2016 5:23 am
Location: Yorkshire

Re: Running out of space

Post by jamesofyorkshire »

flatpak is a bug?
Locked

Return to “Beginner Questions”