Score:0

Is it safe to remove the 'apt' job from cron.daily?

de flag

I'm running a production server (Ubuntu 14.04 - yes I know it's old!) and a couple weeks ago it started randomly crashing due to lack of memory each night around the time the daily cron job starts. At first I thought it was a database backup job that I had created (the only cron job on the box that I've made). After much digging and many angry customers, I found that the job that was causing the crash was "apt". (/etc/cron.daily/apt)

I don't want this to run. I don't want to risk my server failing, and I can see that when I run it it uses a ton of memory and CPU.

I can see that it's related to the OS package manager and the code appears to be calling apt-config a few times and possibly attempting unattended upgrade (this is NOT something I want to happen on a production server).

Is it ok to remove this job from the daily cron folder? Are there any consequences I should be aware of if I stop running this file?

guiverc avatar
cn flag
Only supported releases of Ubuntu (*standard support*) are on-topic for this site. Ubuntu 14.04 LTS is in extended support and now Ubuntu 14.04 ESM thus only supported by Canonical via Ubuntu Advantage and off-topic here. Refer https://askubuntu.com/help/on-topic https://help.ubuntu.com/community/EOLUpgrades http://fridge.ubuntu.com/2019/05/02/ubuntu-14-04-trusty-tahr-reached-end-of-life-on-april-25-2019-esm-available/
Score:0
us flag

In general it's not best to remove a file belonging to a package that's installed.

In this case, it appears that:

  • The file is replaced by apt-compat many years ago, so the apt file may be left over from a much older install
  • The file, at least its newer apt-compat incarnation, doesn't do anything if you have systemd because apt instead uses systemd to do the same thing

Edit: I did not realise you were running 14.04, goodness. Drop other priorities and focus on migrating to a supported platform.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.