How to upgrade Kali Linux

64,159

Solution 1

The apt-get upgrade command you have used will only upgrade packages that need no new packages as dependencies.

You can use apt-get dist-upgrade to include new packages in the set of candidates. Be aware though that using dist-upgrade will also delete packages that have been obsoleted by other, possibly newer, packages.

Solution 2

According to debian-administration some packages are being "kept back" beacause:

There we can see four packages haven't been upgraded, even though newer packages are available. This is because two new packages were introduced, and these upgrades depend upon it.

To fix this you must run :

apt-get dist-upgrade

Solution 3

What about

apt-get update && \
apt-get upgrade && \
apt-get dist-upgrade && \
do-release-upgrade

?

Share:
64,159

Related videos on Youtube

nicovell3
Author by

nicovell3

Updated on September 18, 2022

Comments

  • nicovell3
    nicovell3 over 1 year

    I've installed Kali Linux (normally I use ArchLinux, but I need Kali for work) and every time I want to upgrade, a few packages can't upgrade and are kept back. To force them to update I have to manually select them and perform an installation.

    To update, I use the following command:

    apt-get update && apt-get upgrade
    

    Even from a clean installation the problem persists. Is there someone with the same problem? How can I solve it permanently?

    • terdon
      terdon about 8 years
      Please edit your question and add the output of the commands you show, so we can understand what's going on.
  • Alessio
    Alessio about 8 years
    Another important difference between upgrade and dist-upgrade is that apt-get upgrade will NOT remove packages, even if doing so is required to upgrade another package (thus preventing that package from being upgraded). apt-get dist-upgrade WILL remove packages if required to install or upgrade other packages.
  • roaima
    roaima about 8 years
    @cas yes, agreed. Answer amended; if you don't like what I've added please feel free to change it.
  • Tyler Curtis Jowers
    Tyler Curtis Jowers about 6 years
    Is this a question or an answer?
  • tuxayo
    tuxayo about 6 years
    «Be aware though that using dist-upgrade will also delete packages that have been obsoleted by other» Has it ever been a problem from experience? Or can it actually be an advantage to remove unuseful packages.
  • roaima
    roaima almost 4 years
    @tuxayo it only really matters if you have installed software outside of package management that depends on libraries, etc., in these obsoleted packages