Random trash files appearing in /home directory, why and how to delete effectively?

I’m having this for over a month and I think files like these just keep adding up.
I don’t know what they are, I just know that I surely didn’t create them and there is more than a hundred.
I can’t delete through Dolphin cause it’s saying “file doesnt exist” and with console names are still messed up and there is, like a said, too many of them to delete them 1 by 1.

Does someone know why it’s happening and how to delete all this garbage? Thanks.

Considering the place, i’d say either a process run by root is responsible, or it is a side effect of file system corruption.

Does /home have its own partition?

No, my /home is on the same partition.

The latter, most definitely.

So what do I do now, reinstall?

Force-fsck your filesystem. :arrow_down:

If you use the base mkinitcpio hook, you can force fsck at boot time by passing fsck.mode=force as a kernel parameter. This will check every file system you have on the machine.

https://wiki.archlinux.org/title/Fsck

At the GRUB boot screen, press E and add fsck.mode=force to the boot line. Then press F10 to boot.

I don’t really have GRUB boot screen. Laptop logo and OS right after. If I’ll press E continuosly it’ll get it entered, but that thing will dissapear soon after into my login screen.
Can it be set with grub boot parameters or something?

Edit in terminal:
sudo nano /etc/default/grub
and change the third line to: GRUB_TIMEOUT_STYLE=menu
(instead of hidden)
save (ctrl o) and next command: sudo update-grub
then reboot - grub-menu should be visible then.

2 Likes

Nothing happened. At least visually.

Don’t press “E”
that is for editing the config once you successfully got to that point
you are not there yet - and “E” will NOT get you there

It’s different keys that interrupt the sequence.

Like:
F1 or ESC or …
I just don’t know off the top of my head what will surely show you the now hidden menu
… try different keys from the top row …

Instead of trying to figure it out
or
instead of trying to edit the grub configuration
which you can’t seem to make work

just boot a live system - like … literally any linux ISO you have

you never reported back the result of:

You can easily force check your filesystem (if it is not BTRFS) using literally any Linux live ISO.

… but I have suspicion that it is going to turn out to be BTRFS …

I got to the grub to add the parametr - didn’t work.
Output of the command:

LANG=C sudo parted -l
NAME        FSTYPE FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                               
├─nvme0n1p1 vfat   FAT32 NO_LABEL 9FD1-FBD7                             298.8M     0% /boot/efi
├─nvme0n1p2 btrfs                 b11151cf-968d-43ca-b20e-de830fdcd43d   72.7G    83% /var/log
│                                                                                     /var/cache
│                                                                                     /home
│                                                                                     /
└─nvme0n1p3 swap   1              4f4b6d77-27c4-40ac-933e-a1fe1902af3c                [SWAP]
[sudo] password for sasha: 
Model: KINGSTON OM8PDP3512B-AA1 (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name  Flags
 1      2097kB  317MB  315MB   fat32                 boot, esp
 2      317MB   491GB  490GB   btrfs           root
 3      491GB   512GB  21.5GB  linux-swap(v1)

And yeah, as you can see it’s btrfs.

BTRFS

In that case - I’m immediately out.
Because I cannot give advise on something I have never ever used and of which I do know very little about.

But now finally having that information, knowledgeable people here can help you further.

Cheers!

Is BTRFS so bad and different in terms of maintanance/problem fixing or?

It’s not bad (not at all)
but simply very different in maintenance (and other aspects as well)

And I have zero experience with it - so:
I rather defer you to the people who actually KNOW about it
before I try to render useless or even detrimental advice.

I simply cannot give advise based upon having worked with it, based upon experience.
Because I have no experience, I have never used it.

BTRFS is good - but it has got some peculiarities.
One of them is: you cannot simply fsck it.
The procedure is different - and I don’t know it.


ps:
the directory these files are in is
/home

not:

/home/$user

it’s good that you spotted them -
but why did you even look there?

It’s not something an “ordinary” user would even notice …

1 Like

actually I just checked… Don’t know how I didn’t notice. It’s in the /home/user. Dolphin just calls it Home

If you insist …
but it really does not change anything anyway, fundamentally

the contents and headline of your screen shot
featured in your initial comment
actually runs counter to that
it says something different
it says what you initially said.

“it” calls it “home”
when it is actually
“/home/user”
?

don’t think so - but might be true

but it is a screen shot …

better is to check:
ls -al /home

vs.

ls -al ~/

wait for people who can tell you how to fix your file system

or - based upon all the info so far

look for yourself

there is info on that - here and on the wider internet

it is user folder. I just got stupid on the start.
For what I know /home doesn’t have random crap like Downloads folder :slight_smile:

@ Nachlese per both @ cheerfulnag’s screen shots, yes /home/[username] is always displayed in Dolphin as Home.

Hence @ cheerfulnag’s confusion, and subsequently yours.

That is truly confusing indeed - certainly to me.
Thank you for that clarification.

… I still don’t know how to deal with problems with BTRFS …

Nor do I, unfortunately.