kolukuri
kolukuri

Reputation: 337

How to apt-get upgrade only one package in Ubuntu?

Want to upgrade only a single apt package , without any changes to other auto system packages. Example package for Jenkins

Upvotes: 2

Views: 2507

Answers (1)

kolukuri
kolukuri

Reputation: 337

To upgrade a single process in Ubuntu

Update: apt update

First update the apt packages to fetch latest versions

$ sudo apt-get update

Upgrade only single package:

In general, replace the package name to your target package

$ sudo apt-get --only-upgrade install <package>

Example:

Upgrade only Jenkins:

Use the following commands

$ sudo apt-get --only-upgrade install jenkins

And then restart the Jenkins server using command

$ sudo systemctl restart jenkins.service

Upvotes: 6

Related Questions