- 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 Install Specific Version of Package using apt-get
- 1) Check the available versions of packages
- 2) Install a specific version of a package
- a. Simulate the installation
- b. List the installed packages with the versions
- Conclusion
- How to check the version before installing a package using apt-get?
- 10 Answers 10
- How can I check the available version of a package in the repositories?
- 7 Answers 7
- Additional benefits
- Pro tip
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 Install Specific Version of Package using apt-get
Install a specific version of a package can be useful to avoid the bugs when you know which version of a package is concerned and make sure to disable a specific package from updating by holding the packages so it won’t get automatically updated when you run ‘apt-get upgrade’.
To handle Debian-based system packages, we use the apt-get command. To run this command you require administrative rights or a user with sudo privilege.
In this tutorial, I will show you how to install a specific version of a package on Ubuntu 16.04 or 20.04 LTS.
1) Check the available versions of packages
Sometimes you can face issues or bug with a version of a package, this may cause you to choose a version which doesn’t encounter bugs. Before installing, it is possible to check the available versions of a package with the apt-cache madison command. The syntax is
You can see the output below
You can also use the syntax command below
Then, with one of the two commands, you can decide to check the available version of a package with the releases versions on the official site or on the official GitHub.
2) Install a specific version of a package
When you have listed the versions to choose the specific one, you can install it with the apt-get install command followed by the name and the version of the package. So, you need to follow the syntax as below:
The -V parameter helps to have more details about the installation
Practically, you can do as below:
a. Simulate the installation
For some reason, you could need to make sure that the installation will not encounter any problem. To do that, it is possible to simulate the installation with the -s parameter respecting the syntax
You can see that it shows the process of the installation but it is a just a simulation.
b. List the installed packages with the versions
You can need to check the version of an installed package. You can do it with the dpkg command combined with grep followed by the name of the package
If you want to filter the information, you can use the command as below
To list all the installed packages with version, you can use dpkg -l command.
Conclusion
It’s not very often you come across a scenario to install specific package, I hope this tutorial helped you. Please leave your comment and suggestions in the below comment section.
Источник
How to check the version before installing a package using apt-get?
I’m thinking to install hylafax+ version 5.5.4 which was release last month on my Debian PC.
I checked dpkg -l | grep «hylafax» and found out that the current version is 5.5.3. Then I checked apt-cache search hylafax and saw the packages are available, but I can’t see any version number.
How can I find the version of packages available in the apt-get ?
10 Answers 10
will show the version details.
It also shows which version is currently installed and which versions are available to install.
For example, apt-cache policy hylafax+
apt-cache policy
apt-get install -s
apt-cache show
Linux Mint, Debian 9, Ubuntu 16.04 and older:
Short info:
Detailed info (With Description and Depends):
The following might work well enough:
gives the list with package, version to be upgraded, and actual version of the package.
Also, the apt-show-versions package (installed separately) parses dpkg information about what is installed and tells you if packages are up to date.
As posted somewhere else, this works, too:
Also, according to the man page:
can also be used to:
. display information about the packages listed on the command line. Remaining arguments are package names. The available versions and reverse dependencies of each package listed are listed, as well as forward dependencies for each version. Forward (normal) dependencies are those packages upon which the package in question depends; reverse dependencies are those packages that depend upon the package in question. Thus, forward dependencies must be satisfied for a package, but reverse dependencies need not be.
Источник
How can I check the available version of a package in the repositories?
How can I check the version of the available package in the Ubuntu repositories without installing it?
7 Answers 7
Use the command:
This gives you information of all available package versions.
From the output, you can see that there are two versions available: 2.0.8-0ubuntu0.13.04.1 and 2.0.6-1 . It also tells you which repositories they are coming from.
Installed: tells you the version you have installed. If you don’t have the package installed, you’ll see (none) .
Candidate: is the version that will be installed if you use apt-get install vlc . If you want to install the other version, you would do apt-get install vlc=2.0.6-1 .
Go to packages.ubuntu.com, fill in the search form and get a nice view of the package including the version.
Hit search, then:
Additional benefits
- Will also list versions of packages for other versions of Ubuntu. Eg. if you want to know about the version of the package in Raring (13.04), but your system still has Precise (12.04), then this will provide a way to find it out.
- You don’t even need Ubuntu to be installed.
Biggest downside is that it won’t list the versions of other repositories you possible have installed, such as PPAs. You will then need the apt-cache policy approach as already posted.
Pro tip
Take the shortcut — just browse to http://packages.ubuntu.com/packagename and replace packagename with the name of the package you want to query.
It also gives information about all available package versions in the repositories. This command output had the syntax like this:
apt-cache’s madison command attempts to mimic the output format and a subset of the functionality of the Debian archive management tool, madison. It displays available versions of a package in a tabular format. Unlike the original madison, it can only display information for the architecture for which APT has retrieved package lists (APT::Architecture).
Источник