How to execute SSD Trim on demand

Hello, I have a question, how to execute SSD on demand?

I have already setup the scheduled timer for automatic trim:
sudo systemctl enable --now fstrim.timer

and i started the timer for ssd trim:
sudo systemctl start fstrim.timer

So this is not my concern.

My question is how to execute trim on demand, because i want to trim manually my SSD once, nad after that, the automatic trim will take over.

i tried to look for the command in the forum but was not able to find it.

Thanks

sudo fstrim -v /

trims your root partition.

More options can be found here:
https://man.archlinux.org/man/fstrim.8

sudo fstrim -a

trims all mounted filesystems.

2 Likes

Hello @Wollie,

I executed the command, it worked nicely, thank you.

:beers: cheers :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.