1

My Ubuntu 14.04 server has the default settings for fetching updates i.e. /etc/apt/apt.conf.d/10periodic has following entries:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";

My understanding is that APT::Periodic::Update-Package-Lists "1"; means APT will run apt-get update once a day.

When I log into the terminal, it prints out messages about updates, so this seem to confirm the fact that APT is updating the local package cache automatically.

3 packages can be updated. 3 updates are security updates.  

Last login:

So I run apt-get dist-upgrade to upgrade to newest available packages, but then once the update is performed, if I happen to log out and then log back into the server, I get a message saying:

Now there are 30 packages to be updated - 25 security.

So then typically I run sudo apt-get update just to be sure I actually have the most up to date package cache and then run apt-get dist-upgrade again. But even after that, I get a similar prompt when I log out and log back in i.e. There are more packages to be installed.

So the typical process involved running sudo apt-get update, apt-get dist-upgrade 3, 4, or 5 times until the prompts saying There are more packages to be installed goes away.

Does anyone know why this keeps happening?

  • I don't think apt-get update is being run once per day. I think if you try the update command before you do your first sudo apt-get dist-upgrade command you'll see more packages available for upgrade than are being reported at the login prompt. Not sure why you have to run the dist-upgrade up to 5 times though, that really doesn't sound right. – Arronical Jan 21 '16 at 10:33
  • @Arronical Im guessing apt-get update is being run sometime because the system is aware of new package versions - without me running update command. but it doesn't seem to matter whether or not update is run prior to the upgrade anyway. For example, I just right now had to reboot after running dist-upgrade . I think that was the second round of update then dist-upgrade now I have a message telling me there are 25 packages can be updated. 19 updates are security updates. . I will try another another update then dist-upgrade again and see what happens. – the_velour_fog Jan 21 '16 at 10:44
  • Sure enough, after running apt-get update then dist-upgrade again, now the system is telling me there are still 25 packages can be updated. 19 updates are security updates. But Im wondering if this time - its simply the message prompt is not getting updated? – the_velour_fog Jan 21 '16 at 11:25
  • It seems that was it .. running sudo apt-get dist-upgrade this time apt-get distupgrade command tells me nothing to install. – the_velour_fog Jan 21 '16 at 11:27
  • Yes I seem to remember this happening when I've done that, I know it's not always necessary, but I tend to do a reboot after a dist-upgrade, especially if the kernel has been updated. I don't think it can utilise the new kernel without rebooting. – Arronical Jan 21 '16 at 11:36
-2

dist-upgrade is not the option you want to resolve that issue.

Use apt-get update and then apt-get upgrade.

dist-upgrade is meant to upgrade to a higher version of Linux. The two commands look similar but all you need is apt-get upgrade.

  • "apt-get update" is not really needed as it's been already run once per day. I'd rather add "apt-get autoremove" and "apt-get clean" in order to purge packages that are not needed any more and the package cache. – EnzoR Jan 21 '16 at 10:05
  • 1
    I know the command dist-upgrade sounds like it might upgrade you to a new distro - but it doesn't - and it definitely doesnt upgrade the linux kernel. @Uqbar thats whats confusing to me, I thought because apt-get update is getting run once a day - it should be up to date right? so where do the new packages keep coming from? – the_velour_fog Jan 21 '16 at 10:09
  • The package repositories get continuously updated accordingly to the specific release policy (LTS get longer support). So, from time to time, when the apt-get update is run, a new updates can be available to installed packages. This is due to normal updates or to security ones. So, in the end, it's not about new packages being installed but rather old ones (already installed) being updated. – EnzoR Jan 21 '16 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.