• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Sunday, May 18, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

How to Install Particular Package Version in CentOS and Ubuntu

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
150
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Install Specific Package Version in CentOS/RHEL/Fedora
  2. Install Specific Package Version in Ubuntu and Debian

Usually, when you install a package in CentOS and Ubuntu, the package management software selects the latest package version from the repository, by default. However, sometimes, for one reason or the other, you may want to install a specific package version on your Linux system.

In this article, we will explain how to install a particular or specific package version in CentOS and Ubuntu using Yum and APT front-end package managers, respectively.

Install Specific Package Version in CentOS/RHEL/Fedora

First, you need to check for all the available versions of a package, whether installed or not. Normally, yum ignores specific versions of a package and will always try to install the latest version available.

Secondly, when you try to find info about a package, yum only shows the latest version of that package in the output of info, list or search sub-commands; but using the --showduplicates switch, you can display all package versions present in the repository.

# yum --showduplicates list nginx
How to Install Particular Package Version in CentOS and Ubuntu

List All Package Versions in CentOS

From the above command output, the naming format for packages are:

package_name.architecture  version_number–build_number  repository

The build_number represents minor changes made by the package maintainer, not by the program author, such as additional documentation, changes to configuration files, or bug fixes and more.

Once you have identified the specific version of a package (for example nginx-1.10.3-1.el7.ngx), install it as follows. Note that the name format will have to change here, to the full RPM desired, package_name-version_number as shown in the following command.

# yum install nginx-1.10.3

Alternatively, if you want to use a version with certain updates, specify the build_number (package_name-version_number-build_number) as shown.

# yum install nginx-1.10.3-1.el7.ngx
How to Install Particular Package Version in CentOS and Ubuntu

Install Particular Package Version in CentOS

Considering the above situation, a newer version of the packages is already installed on the system. Therefore, you need to remove the installed package version, if you want to install an older version from the available packages as shown.

# yum remove nginx

Once you have removed the installed package, you can then install the specific version you desire as explained above.

Install Specific Package Version in Ubuntu and Debian

First check the version of the package installed on your system plus all available packages in the repository, using the apt-cache command below.

$ apt-cache policy firefox
How to Install Particular Package Version in CentOS and Ubuntu

Check Installed Package Version in Ubuntu

To install a specific package version, use the following command with syntax below.

$ sudo apt install firefox=45.0.2+build1-0ubuntu1
How to Install Particular Package Version in CentOS and Ubuntu

Install Specific Package Version in Ubuntu

If a newer version of a package is already installed on your Ubuntu system, you can remove it and then install the version you want.

$ sudo apt remove firefox
$ sudo apt install firefox=45.0.2+build1-0ubuntu1

That’s all! For more information, refer to the yum, apt, apt-cache man pages. If you have any queries, use the comment form below to get to us.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

13 Basic Cat Command Examples in Linux

Next Post

Block SSH Server Attacks (Brute Force Attacks) Using DenyHosts

Next Post

Block SSH Server Attacks (Brute Force Attacks) Using DenyHosts

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet