Can I choose which packages I want to upgrade with apt?

Using apt-get upgrade upgrades all packages, not just some of them.

Using apt-get install package doesn't upgrade some by me required packages which are related to the specified package.

Example: When I type sudo apt-get install firefox, packages like firefox-locale-en still using previous package version.

  • Why do you want only upgrade some specified packages? – BuZZ-dEE Feb 22 '13 at 21:01
  • @obysr If there are no updates to any dependency, then the installed version will be kept when updating the main package. In fact, the new version of the package has that "old" version of a dependency as its own dependency. – carnendil Feb 22 '13 at 21:20
  • 1
    @BuZZ-dEE cause my connection has limited quota, so i just download that i think they're important. – obysr Feb 23 '13 at 10:27
  • 1
    @carnendil it means firefox-locale-en is not firefox's depencies? how does canonical manage its product? – obysr Feb 23 '13 at 10:28
  • 2
    @obysr firefox doesn't depend on firefox-locale-en. You can see it with: apt-cache depends firefox. – BuZZ-dEE Feb 23 '13 at 15:30

Assuming you have old versions of the packages foo and bar, you can use apt-get install foo bar, which will install the latest versions of selected packages foo and bar, resulting in an upgrade.

|improve this answer|||||

If there are specific packages that you don't want upgraded, you can lock them to the current version. There are instructions here: How to prevent updating of a specific package?

Then you can use apt-get upgrade to update the rest.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.