"apt-get upgrade sqlmap" is upgrading all packages instead of just sqlmap. Is this expected behavior?

7,997

Solution 1

This is the correct behaviour. Read the doc (man apt-get):

       upgrade
           upgrade is used to install the newest versions of all packages
           currently installed on the system from the sources enumerated in
           /etc/apt/sources.list. Packages currently installed with new
           versions available are retrieved and upgraded; under no
           circumstances are currently installed packages removed, or packages
           not already installed retrieved and installed. New versions of
           currently installed packages that cannot be upgraded without
           changing the install status of another package will be left at
           their current version. An update must be performed first so that
           apt-get knows that new versions of packages are available.

Solution 2

If you just want to upgrade that one package, change the command after && to:

apt-get install sqlmap

Using apt-get upgrade will attempt to upgrade every package that can be upgraded.

Solution 3

You must use to only update one package the next line:

apt-get install --only-upgrade <packagename>

Being <packagename> sqlmap.

Share:
7,997
Linux Newbie
Author by

Linux Newbie

Updated on September 18, 2022

Comments

  • Linux Newbie
    Linux Newbie over 1 year

    I issued the following commands, combined with a double-ampersand, i.e "&&".

    apt-get update && apt-get upgrade sqlmap
    

    Apparently all the installed packages are being upgrading. This is not what I intended. I just wanted to upgrade a package named, "sqlmap". Why this behavior?