How do I use TRIM on Fedora?

Hello.

I installed Fedora 30 on my SSD. But I don’t know how to use TRIM.
Please tell me how to use it.

As far as I know there is a command: fstrim
sudo fstrim -av
trim all supported mounted filesystems (and print number of discarded bytes).

You can enable a service (a systemd timer) that Discard unused blocks once a week:
sudo systemctl enable fstrim.timer --now

Then check when it will run the next time and when was the last execution.
systemctl list-timers --no-pager

10 Likes

I could set TRIM and timer. Thank you.

1 Like