Create a daily cron.

nano /etc/cron.daily/trim

While editing the trim file add the fstrim command to the file.

sudo fstrim -v / >> /dev/null 2>&1

Once you've added your SSD partitions, save the file and make it executable using the following command:

sudo chmod +x /etc/cron.daily/trim

Ubuntu executes the daily cron at around 06:25 (if the computer is turned on)


comments powered by Disqus