Something is eating disk space [SOLVED]

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
iccaka
Level 1
Level 1
Posts: 21
Joined: Mon Jun 11, 2018 10:37 am

Something is eating disk space [SOLVED]

Post by iccaka »

Hello everyone! I'm using Linux Mint 19.3 and yesterday I ran BleachBit with every option enabled. A couple of minutes later it was done and I noticed there was a warning saying I don't have free disk space. I then started the default "Disks" program and saw that half of my disk is occupied by something. I got scared :D and reverted back to a previous snapshot using Timeshift. When this was done, I again opened the Disks program and saw that there wasn't any changes (what was I thinking.. :D). Today I've ran numerous checks to see what is eating my disk space but to no avail.

Running

Code: Select all

du -csh
gives me

Code: Select all

54G	./root
32G	./home
9,5G	./usr
6,9G	./var
5,7G	./snap
4,5G	./lib
1,3G	./boot
19M	./sbin
16M	./etc
16M	./bin
1,5M	./run
300K	./tmp
32K	./timeshift
16K	./lost+found
16K	./dev
12K	./opt
12K	./mnt
4,0K	./srv
4,0K	./lib64
4,0K	./cdrom
0	./sys
0	./proc
Does that look normal to you? Should I be concerned?
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.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Something is eating disk space

Post by Flemur »

iccaka wrote: Wed Oct 27, 2021 7:58 am

Code: Select all

54G	./root
32G	./home
Does that look normal to you? Should I be concerned?
No. Yes.

/root should have almost nothing in it, so look there.

I'm guessing there's stuff from bleachbit which can result when you run it with "every option enabled" which would include "Overwrite free disk space to hide deleted files" that can make BB use lots of disk space for some reason.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
iccaka
Level 1
Level 1
Posts: 21
Joined: Mon Jun 11, 2018 10:37 am

Re: Something is eating disk space

Post by iccaka »

There's nothing inside /root that is that big. I'm using:

Code: Select all

ls -lha
The output is:

Code: Select all

drwx------ 11 root root 4,0K Oct 27 00:59 .
drwxr-xr-x 25 root root  36K Oct 27 20:22 ..
drwx------  2 root root 4,0K Dec 16  2019 .aptitude
-rw-------  1 root root  453 Oct 27 14:58 .bash_history
-rw-r--r--  1 root root 3,1K Apr  9  2018 .bashrc
drwx------  5 root root 4,0K Oct 27 00:47 .cache
drwx------  6 root root 4,0K Oct 27 11:32 .config
drwx------  3 root root 4,0K Jun  3  2020 .dbus
drwxr-xr-x  2 root root 4,0K Oct 27 00:59 Desktop
dr-x------  2 root root    0 Oct 27 11:32 .gvfs
drwxr-xr-x  3 root root 4,0K Jun  3  2020 .local
-rw-r--r--  1 root root  148 Aug 17  2015 .profile
drwxr-xr-x  3 root root 4,0K Sep 10 16:37 snap
drwx------  3 root root 4,0K Jan 24  2021 .synaptic
Am I searching wrong?
MAlfare

Re: Something is eating disk space

Post by MAlfare »

iccaka wrote: Wed Oct 27, 2021 1:32 pm There's nothing inside /root that is that big.
Am I searching wrong?
Yes, you are.
You see some files and some directories, but not their content.
A directory is 4k in size, but can contain thousands of (big) files.
You can try this:

Code: Select all

sudo du -ch /root
or from the
menu / systemadministration / Disk Usage Analyze
[In German: "Menu / Systemadministration / Festplattenbelegungsanalyse"]
Maybe you have to install packet baobab
Disk Usage Analyzer (also known as baobab) scans folders, devices or remote locations and and reports on the disk space consumed by each element. It provides both a tree-like and a graphical representation.
As /root is not a-lowed to be entered by normal users, you should start it that way:

Code: Select all

sudo -H baobab
go to the hamburger menu, select Analyse Directories and select /root
Last edited by MAlfare on Wed Oct 27, 2021 3:17 pm, edited 1 time in total.
User avatar
iccaka
Level 1
Level 1
Posts: 21
Joined: Mon Jun 11, 2018 10:37 am

Re: Something is eating disk space

Post by iccaka »

MAlfare wrote: Wed Oct 27, 2021 2:58 pm
iccaka wrote: Wed Oct 27, 2021 1:32 pm There's nothing inside /root that is that big.
Am I searching wrong?
Yes, you are.
Yo see some files and some directories, but not their content.
A directory is 4k in size, but can contain thousands of (big) files.
you can try this:

Code: Select all

sudo du -ch /root
or from the
menu / systemadministration /harddisk lead analysis
[Translated back from German
menu / Systemadministration / Festplattenbelegungsanalyse]
After running:

Code: Select all

sudo du -ch /root
I get the following output(those are just some of the many files):

Code: Select all

...
5,6G	/root/.local/share/Trash/files/2021-10-17_11-00-01/localhost
5,8G	/root/.local/share/Trash/files/2021-10-17_11-00-01
54G	/root/.local/share/Trash/files
54G	/root/.local/share/Trash
4,0K	/root/.local/share/flatpak/db
8,0K	/root/.local/share/flatpak
54G	/root/.local/share
54G	/root/.local
...
It looks like the '.local' folder is the problem. Is it safe to delete?
MAlfare

Re: Something is eating disk space

Post by MAlfare »

iccaka wrote: Wed Oct 27, 2021 3:11 pm It looks like the '.local' folder is the problem. Is it safe to delete?
The problem is is the trash.
You deleted files using sudo to roots trash, which you cannot empty the normal way.
Use Nemo (if you run Cinnamon) right click /root, select "open as admin", goto /root/.local/share/Trash/files and delete its content (NOT TO TRASH).
Do the same with /root/.local/share/Trash/info
Before deleting the contents have a look at it, maybe you see what you have done, and when.
User avatar
iccaka
Level 1
Level 1
Posts: 21
Joined: Mon Jun 11, 2018 10:37 am

Re: Something is eating disk space

Post by iccaka »

MAlfare wrote: Wed Oct 27, 2021 3:28 pm
iccaka wrote: Wed Oct 27, 2021 3:11 pm It looks like the '.local' folder is the problem. Is it safe to delete?
The problem is is the trash.
You deleted files using sudo to roots trash, which you cannot empty the normal way.
Use Nemo (if you run Cinnamon) right click /root, select "open as admin", goto /root/.local/share/Trash/files and delete its content (NOT TO TRASH).
Do the same with /root/.local/share/Trash/info
Before deleting the contents have a look at it, maybe you see what you have done, and when.
I did what you've suggested and it helped a little. The other thing which was occupying a lot of space was the "snapshots" directory inside "/timeshift". Is it considered a good practice to use Timeshift?
aybesea
Level 2
Level 2
Posts: 67
Joined: Thu Jul 07, 2011 8:07 pm

Re: Something is eating disk space

Post by aybesea »

iccaka wrote: Wed Oct 27, 2021 4:15 pm I did what you've suggested and it helped a little. The other thing which was occupying a lot of space was the "snapshots" directory inside "/timeshift". Is it considered a good practice to use Timeshift?
Timeshift is an outstanding tool, but it will eat the bejeezus out of your hard drive. Limit it to 2 snapshots, 15 or more days apart.

You can always do an ad hoc snapshot if you need one. But then delete the oldest to stay at no more than 2 snapshots.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Something is eating disk space

Post by Flemur »

iccaka wrote: Wed Oct 27, 2021 4:15 pm I did what you've suggested and it helped a little.
It should've help more than a little since /root (trash) was using up about half your disk. Most of the rest is used in /home = your personal files - you should check that trash, too.
The other thing which was occupying a lot of space was the "snapshots" directory inside "/timeshift".
Not according to your initial post:

Code: Select all

54G	./root
...
32K	./timeshift
Is it considered a good practice to use Timeshift?
Probably, but it often causes disk-filling problems if people don't keep an eye on it.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
iccaka
Level 1
Level 1
Posts: 21
Joined: Mon Jun 11, 2018 10:37 am

Re: Something is eating disk space

Post by iccaka »

Thank you all for your quick replies. One more question:
What is the purpose of the "/home/iccaka/.cache" folder? It occupies 7.9G of memory.
MAlfare

Re: Something is eating disk space

Post by MAlfare »

iccaka wrote: Wed Oct 27, 2021 4:49 pm What is the purpose of the "/home/iccaka/.cache" folder? It occupies 7.9G of memory.
It does not occupy memory, but disk space.
Have a look at it with Disk Usage Analyzer
It is a cache, and it is YOUR cache, so nobody can be sure what is in it but you.

Concerning timeshift:
I use it regularly before doing dangerous actions, upgrades per example.
My opinion:
1. Destination is a different one than the root partiton.
2. No automation, manual snapshots only, and manual deletes also.
Locked

Return to “Software & Applications”