0

Often I don't need to do

apt-get update 

because that command will also update the system when I only need to update a software only. The reason is for example firefox new version only require 20++ MB alone while updating the system will take more bandwidth than needed.

So can I do this or it's not possible within Ubuntu?

3
  • 1
    sudo apt-get update does not update packages, it only updates the list of packages and available versions. sudo apt-get upgrade updates the packages themselves
    – carreter
    May 31, 2016 at 23:45
  • Sure it is possible, but not all downloaded program files do updates, some overwrite, some install besides the current version, so doing updates is the better solution. If you do it the other way, you risk more problems. May 31, 2016 at 23:45
  • 2
    @AndroidDev has explained what to do instead in their answer, but I just want to note - do not overwrite applications installed with a package manager using a .tar file. tarfile releases usually assume different things about what files go where, and the system might get very confused. For any given package, if there's a reason it's better to use a tarfile release (which there isn't here - again, see the answer below) you should remove and purge the version from the package-manager first.
    – Darael
    Jun 1, 2016 at 0:49

1 Answer 1

7

I believe you are confused.

sudo apt-get update

Will only update the software repos list.


sudo apt-get upgrade

On the other hand, will update your software. (Sometimes you might have to run dist-upgrade as well)


Now, onto your actual question:

If you only want to upgrade a single package, just do:

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

For example, to update firefox:

apt-get install --only-upgrade firefox

You must log in to answer this question.

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