Filelight - numerous non-existent files in ~/.cache

I wanted to check what was mostly using my cache, and so i analyzed ~/.cache in filelight, but it gave me a weird result. It shows there are /6.805 files, of average size 29.6KiB for a total of 196.6MiB.

Now it’s not really a big deal, i still have plenty fo space left. but i was curious as to what all of those files where and if my filesystem was somehow corrupted;
i did run ls -a | wc -l and it returned 70, which minus . and .. is what i actually see in terms of folders and files;

If i run ncdu those files are nowhere to be found, but Total disk usage is 2.6GiB whilest Apparent size is 2.4GiB, this would account for the missing ~200MiB.

I also did boot from a live image and run check and repair with Gparted (couldn’t be bothered to risk ■■■■■■■ up suck a critical command on my /home) and there are absolutely no lost+found files…

Shutting down does not change this, sync does nothing too.

Online i couldn’t find anything, so here i am asking if someone has any idea of what those ghost files are, where they are, and if it’s possible to delete them.

No, there are no mounts possibly covering existing files.

  • the filesystem you use is?
  • ~/.cache is not critical - if in any doubt:
    don’t try analysis, just delete the whole directory
    it will be re-created

no, you didn’t/no it didn’t - likely some copy/paste error
that command as you posted it … simply doesn’t work

1 Like

I will try to rm -r and see if it fixes it.

Btw i attempted to show the current directory as in a terminal but it seems i failed miserably. Edited.

ahh, I see.
This will work and is likely how you did it:

cd ~/.cache && ls -a | wc -l

or, as separate commands:

cd ~/.cache
ls -a | wc -l

it may not be important anymore now, but:

the filesystem you use is which? (ext4 or btrfs or …)

oh yeah, sorry. ext4.
I did delete the cache and they seem to be gone… from ~/.cache… but now it would seem they went directly into the /home directory.

I’m almost sure at this point i’m overthinking it

come again?

how could removing a directory (along with it’s contents) result in it just re-locating?

well, there is a way:
you deleting it via the file manager - and the file manager is putting it in the trash bin
instead of indeed removing it …

Check the trash bin.

Well i did use rm -r ~/.cache;
But now using filelight i see 297.1MiB of varius files in my home? … and still a 200MiB disparity somehow
Total disk usage: 13.6 GiB Apparent size: 13.4 GiB

Wait maybe it’s something that’s just… allocated but not used. like actual data vs empty blocks?

That to me is evidence of you overthinking things. :sunglasses:

Having ~300 MB of files in your $HOME directory is not at all unusual
unless you positively know that there should only be some amount you know about.
There is other hidden directories and files as well - besides ~/.cache …

1 Like

You’re probably right. How could they even exists otherwise? It’s not like they’re filling up my /home

I was extremely worried i had some weird stuff going on. I’m not new to linux, but i’m fairly new to daily driving it; and also extremely paranoid i’m doing something wrong.

Thanks a lot for the help.