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

6
  • 12
    Run sudo apt-get dist-upgrade.
    – Pilot6
    Sep 18, 2015 at 14:57
  • 1
    There is nothing to upgrade. All upgrades are installed. What is the problem?
    – Pilot6
    Sep 18, 2015 at 15:00
  • Did you run sudo apt-get update?
    – Pilot6
    Sep 18, 2015 at 15:01
  • 2
    i used all these but when i am trying to upgrade then i again show the line 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded Sep 18, 2015 at 15:05
  • 1
    i post the output of sudo apt-get upgrade @Ravan Sep 18, 2015 at 15:44

1 Answer 1

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.

10
  • 7
    How does this answer the question?
    – Pilot6
    Sep 18, 2015 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, 2015 at 16:45
  • 3
    This question may help: askubuntu.com/questions/601/…
    – Daniel
    Sep 18, 2015 at 16:48
  • 1
    It's got a good answer for why things might be kept back, IMHO.
    – Daniel
    Sep 18, 2015 at 16:48
  • 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, 2015 at 16:18

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