1

Using the disk analyzer to clean some garbage I found some (automatically made?) backups. At least I hadn't installed any backup package, so I suppose it must be safe to get rid of the older ones.
How can I configure Sublime Text to keep only the last N-backups?

enter image description here

1 Answer 1

0

Via sublime - you can't.

But you're on Ubuntu, so why not use cron? Add the following script (i.e. clean_sublime_backups) to /etc/cron.daily:

#!/bin/bash
ls -t /home/YOURUSERNAME/.config/sublime-text-2/Backup/ | sed '1,5d' | xargs rm -r

Afterwards chmod 755 /etc/cron.daily/clean_sublime_backups. To change the number of Backups left, modify the '1,5d' part as '1,YOURNUMBERd'. Backups will be cleaned every day.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .