23

when i update and upgrade , i show these lines The following packages have been kept back: mysql-utilities 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

but when i use dist-upgrade then i show these lines

sudo apt-get dist-upgrade
[sudo] password for anki: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


sudo apt-get upgrade
[sudo] password for anki: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mysql-utilities
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

unable to upgrade

1 Answers1

30

First step always before updating or installing something is to run sudo apt-get update

Second step is to run your sudo apt-get upgrade or sudo apt-get dist-upgrade

One final point, if there's nothing to upgrade, then it won't upgrade anything.

Daniel
  • 3,446
  • 7
    How does this answer the question? – Pilot6 Sep 18 '15 at 16:44
  • If he's not running the preliminary commands, or if there's nothing to do, then nothing will be done. – Daniel Sep 18 '15 at 16:45
  • Therefore there's no real issue. He's just got the latest versions of everything. – Daniel Sep 18 '15 at 16:46
  • The question was why 1 not upgraded is still there after dist-upgrade. – Pilot6 Sep 18 '15 at 16:47
  • 3
    This question may help: http://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it – Daniel Sep 18 '15 at 16:48
  • 1
    It's got a good answer for why things might be kept back, IMHO. – Daniel Sep 18 '15 at 16:48
  • @Daniel sir i always follow your method for update and upgrade – Ankit_Chaudhary Sep 18 '15 at 17:05
  • Yes, Thank you Dan, while we -promptly- skip over the text - in this box: 'Avoid comments like "+1" or "thanks"', heh.

    Anyway, this 'issue' is always the question with all n00b users, I mean, hehe; AND, yes, please leave alone teh '_ not upgraded' portion to avoid wrecking havoc! :)

    ... There is USUALLY no need to force it, as it'll most probably not be a security, critical, issue & it could eventually get sorted - as the software versions (those, direct, dependencies) move along - right?? :)) Cool!! :)

    – Nostromov Dec 11 '15 at 10:33
  • 1
    @Nostromov, If there is a package being held back, it can cause a chain reaction resulting in many other packages being held back because they depend on that first package (which has been held back). I had this issue on one of my servers. After the chain reaction finished, I was left with 129 packages being held back, including PHP5 and MYSQL, two very important things for a webserver. – Daniel Dec 11 '15 at 16:18
  • When in doubt, fix it. Because it is broke. – Daniel Dec 11 '15 at 16:18