Should I enable/start fstrim service ?

Hi there,

My system has a SSD as primary disk.
I notice that the service fstrim in Services Manager is disabled/inactive.
Should I enable/activate it ?

I’ve heard that is managed by the kernel and also, the new devices do an auto-trim internally, no need external tools. I’m not sure how to proceed.

I appreciate any comments,

If you have an SSD the installer should have configured fstrim.timer to trigger the fstrim.service every week or so.
As an example, this is what I see for the last few days:

localhost:~ # journalctl |grep fstrim
<snip>
May 29 15:03:38 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
May 29 20:06:42 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
May 30 15:56:56 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
May 30 16:43:17 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
May 30 19:44:54 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
May 30 22:11:45 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
May 31 11:04:28 localhost.localdomain fstrim[4352]: /boot/efi: 169.5 MiB (177774592 bytes) trimmed on /dev/sda1 
May 31 11:04:28 localhost.localdomain fstrim[4352]: /home: 7.2 GiB (7679602688 bytes) trimmed on /dev/sda2 
May 31 11:04:28 localhost.localdomain fstrim[4352]: /: 16.9 GiB (18136068096 bytes) trimmed on /dev/sda3 
May 31 11:04:28 localhost.localdomain systemd[1]: fstrim.service: Succeeded. 
May 31 11:44:57 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
May 31 19:02:51 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
Jun 01 12:26:05 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
Jun 01 20:25:54 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
Jun 01 20:49:02 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
Jun 01 23:17:50 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
Jun 02 14:20:27 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
Jun 02 15:09:41 localhost.localdomain systemd[1]: fstrim.timer: Succeeded. 
localhost:~ #

So IMHO you have nothing to do.

Mine shows the same as yours.
Digging a bit more,

systemctl status fstrim
● fstrim.service - Discard unused blocks on filesystems from /etc/fstab
     Loaded: loaded (/usr/lib/systemd/system/fstrim.service; static)
     Active: inactive (dead)
TriggeredBy: **●** fstrim.timer
       Docs: man:fstrim(8)


I notice that fstrim.service is a secondary service triggered by fstrim.timer. So, you are right. Nothing to do ! Nice !

thank you !

I experienced the same problem. Dude what did you do? Please let me know. เว็บเล่นบาคาร่า](https://www.chokdeebacarrat.com/บาคาร่า/)

If you look at the systemd status of the Timer service, you’ll see the Timer’s next expiry time – the point in time when the fstrim service will be triggered to execute …