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!

2

1 Answer 1

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.

2
  • Thanks! And to just to be clear, these will run as a root command, not just for one user?
    – SyOpsTommy
    Jul 30, 2014 at 19:16
  • @mrtommy Since we are editing root's crontab (note the sudo), this will run as the root user.
    – muru
    Jul 30, 2014 at 19:17

You must log in to answer this question.

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