Ubuntu 18.04 _ fstrim script in /etc/cron.weekly

692 views
Skip to first unread message

thomas...@gmail.com

unread,
May 2, 2018, 5:51:05 PM5/2/18
to Errors in Easylinuxtipsproject
Hi (newbie there),

I've just installed Ubuntu 18.04 and as I've got an SSD, I'm following your guide. However, I can't find the fstrim script in /etc/cron.weekly.
Maybe trim is not scheduled by cron anymore?

Best regards.

compu...@gmail.com

unread,
May 2, 2018, 5:58:52 PM5/2/18
to Errors in Easylinuxtipsproject
That's correct: things have changed in Ubuntu 18.04. My website is mainly aimed at Linux Mint 18.3, which is based on Ubuntu 16.04. That's why the SSD how-to hasn't been modified yet.

In Ubuntu 18.04, you probably need to edit /lib/systemd/system/fstrim.timer and /etc/systemd/system/timers.target.wants/fstrim.timer.

Op woensdag 2 mei 2018 23:51:05 UTC+2 schreef 

danie...@gmail.com

unread,
Jun 2, 2018, 12:52:23 PM6/2/18
to Errors in Easylinuxtipsproject
On 18.04 you need to change the fstrim.timer to dayly with systemctl.
You can achive this easly by making the following command:

sudo systemctl edit fstrim.timer

Over the new file just type:

[Timer]
OnCalendar=daily

Close and save the file created, this will create an override.conf file for fstrim to run daily.

PS: Using this on Mint 19 that is based on Ubuntu 18.04 and its working fine.
Cheers
Reply all
Reply to author
Forward
0 new messages