- Check Debian/Ubuntu Linux package version using apt-get/aptitude command
- Method #1: Ubuntu Linux package version apt-cache command
- Method #2: Debian Linux package version using apt command
- Method #3: Check package version using aptitude command
- Method #4: Package simulation using aptitude or apt-get command
- A note about finding version of installed packages
- 📦 Как проверить версию установленного пакета в Ubuntu/Debian
- Метод 1. Использование команды apt
- How To Find A Package Version In Linux
- Find a package version in Arch-based systems
- Find a package version in DEB-based systems
- Find a package version in RPM-based systems
- How To Check Linux Package Version Before Installing It
- Check Linux Package Version Before Installing It
- Method 1 — Using Apt
- Method 2 — Using Apt-get
- Method 3 — Using Aptitude
- Method 4 — Using Apt-cache
- Method 5 — Using Apt-show-versions
- How To Check Available Version Of A Package In Ubuntu Repositories
- 1. Check available version of a package in Ubuntu repositories from command line
- 2. Check available version of a package in Ubuntu repositories from Ubuntu site
Check Debian/Ubuntu Linux package version using apt-get/aptitude command
Method #1: Ubuntu Linux package version apt-cache command
The syntax is:
apt-cache policy
apt-cache madison
$ apt-cache policy nginx
OR
$ apt-cache madison nginx
Fig.01: apt-cache check package version on Debian/Ubuntu Linux
Method #2: Debian Linux package version using apt command
The syntax is
apt list
Sample outputs:
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
I have vim package # 7.4.963 version installed on my system.
Method #3: Check package version using aptitude command
The syntax is:
aptitude versions
aptitude versions
To find htop version you are about to install on Ubuntu server, enter:
$ aptitude versions htop
Sample outputs:
Method #4: Package simulation using aptitude or apt-get command
The syntax is as follows:
aptitude -V -s install
A note about finding version of installed packages
Use the following syntax:
apt-show-versions
dpkg -s
To see version of install package called vim, run:
$ apt-show-versions vim
vim:amd64/xenial 2:7.4.963-1ubuntu5 uptodate
vim:i386 not installed
OR
$ dpkg -s vim | grep -i version
Version: 2:7.4.963-1ubuntu5
Vim is an almost compatible version of the UNIX editor Vi.
This package contains a version of vim compiled with a rather
version of Vim. See the other vim-* packages if you need more
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
📦 Как проверить версию установленного пакета в Ubuntu/Debian
Есть много людей, которые задают вопрос: «Как мне проверить версию установленного пакета в моей системе Ubuntu/Debian?»
Как узнать версии пакетов, доступные в операционной системе Ubuntu/Debian Linux ?
В Linux все приложения распространяются в виде пакетов, которые представляют собой не что иное, как файлы, связанные с системой управления пакетами.
Это руководство покажет вам несколько команд, которые можно использовать для проверки версии пакета на машине Ubuntu/Debian Linux.
Системы Linux на основе Debian поставляются с двумя основными менеджерами пакетов:
- apt – Управление пакетами из репозиториев
- dpkg – Управление пакетами, загруженными в систему. Часто в формате .deb
- aptitude можно установить и использовать аналогично apt
Чтобы проверить версию установленного пакета на вашем сервере/настольном Ubuntu, используйте любой из методов, показанных в следующих разделах.
Прежде чем начать, обновите APT-индекс вашего пакета:
Метод 1. Использование команды apt
Команда apt имеет список параметров, который можно использовать для проверки версии пакета, установленного в системе Ubuntu или Debian.
Например, чтобы проверить версию пакета curl, установленную на моем сервере Ubuntu/Debian, я бы запустил:
Чтобы увидеть все версии пакета, доступные в репозитории, передайте параметр -a.
Источник
How To Find A Package Version In Linux
Even though package management has become easier with the help of graphical package managers, some users always prefer the command line way. There are different commands to find out the package version in different flavors of Linux. Today, in this tutorial, we will be seeing how to find a package version in some popular Linux distributions such as Arch Linux and its derivatives, Debian and its derivatives, RHEL and its derivatives.
Find a package version in Arch-based systems
To find out an installed package(Eg. VLC) version in Arch Linux and its derivatives such as Manjaro Linux, run the following command:
Sample output:
As you see in the above output, the installed version of VLC package is 2.2.4-3.
To display the extensive details of a package, run:
Sample output:
The above command shows the complete details such as package description, version, build date, installed date, and package owner etc.
Recommended read:
Find a package version in DEB-based systems
In Debian, Ubuntu and its derivatives such as Linux Mint, Elementary OS, we can find the installed a package, Say Apache webserver, version using command:
Sample output:
To display the extensive information of an installed package, run:
Sample output:
Also, we can find a package version using command:
Sample output:
As you see in the above result, I have installed apache2 64 bit version, and its version is 2.4.18.
If ‘apt-show-versions’ program is not installed, you can install it using command:
We know now how to check the installed package’s version. What about the version of a package in the online repositories? Is there anyway to check the version of packages that are available in the official repositories? It’s also possible. Check the following link to find out how.
Even if the packages are not installed in your Debian-based systems, you still can find their versions. Check the following guide for more details.
Find a package version in RPM-based systems
To find out the version of an installed package (Eg.httpd) in RPM based distributions such Red Hat, CentOS, Fedora, Scientific Linux, and openSUSE etc., run:
Sample output:
The above command displays the installed package version, build date, license, description etc. As you see in the output, httpd package version is 2.4.6.
Источник
How To Check Linux Package Version Before Installing It
Most of you will know how to find the version of an installed package in Linux. But, what would you do to find the packages’ version which are not installed in the first place? No problem! This guide describes how to check Linux package version before installing it in Debian and its derivatives like Ubuntu. This small tip might be helpful for those wondering what version they would get before installing a package.
Check Linux Package Version Before Installing It
There are many ways to find a package’s version even if it is not installed already in DEB-based systems. Here I have given a few methods.
Method 1 — Using Apt
The quick and dirty way to check a package version, simply run:
Example:
Sample output:
As you can see in the above output, «apt show» command displays, many important details of the package such as,
- package name,
- version,
- origin (from where the vim comes from),
- maintainer,
- home page of the package,
- dependencies,
- download size,
- description,
- and many.
So, the available version of Vim package in the Ubuntu repositories is 8.0.1453. This is the version I get if I install it on my Ubuntu system.
Alternatively, use «apt policy» command if you prefer short output:
Or even shorter:
Apt is the default package manager in recent Ubuntu versions. So, this command is just enough to find the detailed information of a package. It doesn’t matter whether given package is installed or not. This command will simply list the given package’s version along with all other details.
Method 2 — Using Apt-get
To find a package version without installing it, we can use apt-get command with -s option.
Sample output:
Here, -s option indicates simulation. As you can see in the output, It performs no action. Instead, It simply performs a simulation to let you know what is going to happen when you install the Vim package.
You can substitute «install» option with «upgrade» option to see what will happen when you upgrade a package.
Method 3 — Using Aptitude
Aptitude is an ncurses and commandline-based front-end to APT package manger in Debian and its derivatives.
To find the package version with Aptitude, simply run:
You can also use simulation option (-s) to see what would happen if you install or upgrade package.
Here, -V flag is used to display detailed information of the package version.
Similarly, just substitute «install» with «upgrade» option to see what would happen if you upgrade a package.
Another way to find the non-installed package’s version using Aptitude command is:
- -F is used to specify which format should be used to display the output,
- %c — status of the given package (installed or not installed),
- %p — name of the package,
- %d — description of the package,
- %V — version of the package.
This is helpful when you don’t know the full package name. This command will list all packages that contains the given string (i.e vim).
Here is the sample output of the above command:
Method 4 — Using Apt-cache
Apt-cache command is used to query APT cache in Debian-based systems. It is useful for performing many operations on APT’s package cache. One fine example is we can list installed applications from a certain repository/ppa.
Not just installed applications, we can also find the version of a package even if it is not installed. For instance, the following command will find the version of Vim package:
As you can see in the above output, Vim is not installed. If you wanted to install it, you would get version 8.0.1453. It also displays from which repository the vim package is coming from.
One of our reader has suggested the following command in the comment section below.
Method 5 — Using Apt-show-versions
Apt-show-versions command is used to list installed and available package versions in Debian and Debian-based systems. It also displays the list of all upgradeable packages. It is quite handy if you have a mixed stable/testing environment. For instance, if you have enabled both stable and testing repositories, you can easily find the list of applications from testing and also you can upgrade all packages in testing.
Apt-show-versions is not installed by default. You need to install it using command:
Once installed, run the following command to find the version of a package,for example Vim:
Here, -a switch prints all available versions of the given package.
If the given package is already installed, you need not to use -a option. In that case, simply run:
And, that’s all. If you know any other methods, please share them in the comment section below. I will check and update this guide.
Источник
How To Check Available Version Of A Package In Ubuntu Repositories
The other day a friend of mine asked me how to check the latest available version of a package in the Ubuntu repositories. He just wanted to know the package’s version, even if it is not installed locally. If you ever wondered how to check available version of a package in Ubuntu repositories, read on. It’s not that difficult as you might think. We can do this two methods.
- The command line way
- Graphical way
1. Check available version of a package in Ubuntu repositories from command line
This is the easiest and quickest way to find a package version from command line.
Open your Terminal, and run the following command:
For example, let us find out all available versions of Chromium web browser from the Ubuntu repositories.
Sample output:
As you see in the above output, the latest available version in the remote repository is 65.0.3325.181. This command also indicates in which repositories they are coming from.
You may wonder if the given package is installed or not. It’s easy to find out too.
In the above output, you see two words namely Installed and Candidate.
- Installed : This will tell you the version that you have currently installed in your Ubuntu system. So, in our case, I didn’t install chromium browser in my Ubuntu, hence it shows none. If it is installed, you will the version number after the term «Installed».
- Candidate : This is actual version that will be installed from the Ubuntu repositories when you install Chromium browser using apt-get.
Now let me check another package, say for example firefox.
Sample output:
See? I have installed Firefox in my Ubuntu and the currently installed version is 59.0.2.
Here is two more commands to check the package version from Ubuntu repositories.
The above command will display the complete details of the package version along with all dependencies.
Check available version of a package in Ubuntu repositories
Here is yet another command that displays the package version from Ubuntu repositories.
Sample output:
Unlike the previous command, it will display the output in a neat format.
Well, now let us see the graphical way.
2. Check available version of a package in Ubuntu repositories from Ubuntu site
This method is for Ubuntu desktops. Open your web browser, and go to the following website.
Enter the name of the package version, and hit the Search button.
Search package details from Ubuntu website
That’s it. You’ll see the available version of the package from the Ubuntu repositories.
Check available version of a package in Ubuntu repositories from Ubuntu site
This method has two advantages over the command line way.
First, We can search the package version for different Ubuntu releases. For example, you can search the available package version for a trusty version.
Search package version for specific Ubuntu release
Second, you don’t need an Ubuntu system. You can check the version from any distribution. All you need is an Internet connection, and a web browser.
Источник