0

I have a multi-user system and recently started receiving messages saying

low disk space in filesystem /root 

and the same for /boot.

/boot was at 100% capacity, so I ran:

sudo apt-get autoremove

I want to automate this so I don't have to do it manually. Thanks from a first-timer!

chaskes
  • 15,146
  • 8
  • 53
  • 65
SyOpsTommy
  • 23
  • 5

1 Answers1

2

You could just set up a cron job to run say, every 2 hours like this....

sudo crontab -e

When the editor starts, add this to the end

0 */2 * * *  apt-get autoremove

If you are using the default editor (nano) hit Control O (the letter) and Enter to save and then Control X to exit.

Scott Goodgame
  • 2,626
  • 14
  • 20