possible values for Autocleaninterval for APT::Periodic::AutocleanInterval "0";

Asked by gourig

I want to setup an autoclean in my Ubuntu 14.04

I found out that we can adjust the Autocleaninterval from "0" to "7" to make an weekly cleaning.

I wanted to confirm how can i adjust it to make a monthly cleaning or daily should it be "30" or "1"

Will be glad to get a reply.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

The comments at the beginning of /etc/cron.daily/apt state

...
# APT::Periodic::AutocleanInterval "0";
# - Do "apt-get autoclean" every n-days (0=disable)
...

So it seems that a 'monthly' cleaning is not provided, but setting the value to 30 should do that every 30 days (which is nearly the same).

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#2

Could cron a job yourself as root.

Something like:

0 1 1 * * apt-get clean

Will clean the apt cache at 1:00am on the first of every month....

Revision history for this message
gourig (gouri-gaikwad89) said :
#3

I would like to get more info on this command.

 Also if I want to disable it how can i do it?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

man apt-get

in a terminal