Find package version linux

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 OR
apt-cache madison For example, before I install nginx package I would like to know what version of nginx I would get on my system, run:
$ 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 apt list vim
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 | more
aptitude versions | awk < print $2 >
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 apt-get -V -s install No action taken. It perform a simulation of events that would occur based on the current system state but do not actually change the system. Of course, press n when prompted to avoid installation.

A note about finding version of installed packages

Use the following syntax:
apt-show-versions OR
dpkg -s dpkg -s | grep -i version
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 все приложения распространяются в виде пакетов, которые представляют собой не что иное, как файлы, связанные с системой управления пакетами.

Читайте также:  Windows 10 плохо работают браузеры

Это руководство покажет вам несколько команд, которые можно использовать для проверки версии пакета на машине Ubuntu/Debian Linux.

Системы Linux на основе Debian поставляются с двумя основными менеджерами пакетов:

  • apt – Управление пакетами из репозиториев
  • dpkg – Управление пакетами, загруженными в систему. Часто в формате .deb
  • aptitude можно установить и использовать аналогично apt

Чтобы проверить версию установленного пакета на вашем сервере/настольном Ubuntu, используйте любой из методов, показанных в следующих разделах.

Прежде чем начать, обновите APT-индекс вашего пакета:

Метод 1. Использование команды apt

Команда apt имеет список параметров, который можно использовать для проверки версии пакета, установленного в системе Ubuntu или Debian.

Например, чтобы проверить версию пакета curl, установленную на моем сервере Ubuntu/Debian, я бы запустил:

Чтобы увидеть все версии пакета, доступные в репозитории, передайте параметр -a.

Источник

How to find out if package is installed in Linux

Debian / Ubuntu Linux

Use dpkg command. It is a package manager for Debian/Ubuntu Linux. Suppose you want to find out package apache-perl or sudo is installed or not, type command:
$ dpkg -s apache-perl
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

Another example:
$ dpkg -s sudo
Sample outputs:

Use file /var/lib/dpkg/available to find out all package names available to you. Or you can use following command (list all packages in /var/lib/dpkg/status):
$ dpkg-query -l
You can also try to match package name using wild cards:
$ dpkg-query -l ‘libc6*’
Once you’ve found package name, use the following command to get exact status (whether it is installed or not):
$ dpkg-query -W -f=’$ $\n’ apache-perl
Sample outputs:

Red Hat Enterprise / Fedora Linux / Suse Linux / Cent OS

Under Red Hat/Fedora/CentOS/Suse Linux use the rpm command:
$ rpm -qa | grep For example find out package mutt installed or not:
$ rpm -qa | grep mutt
Output:

If you do not see or get any outputs (package name along with version), it means the package is not installed at all. You can display or list all installed packages with the following command:
$ rpm -qa
$ rpm -qa | less
You can conditionally do something if a rpm command succeeded or failed to find package using bash shell if command:

On a CentOS/RHEL version 6.x/7.x and above use the following yum command to tell whether a package named htop is installed:
$ yum list installed
$ yum list installed htop
Sample outputs:

If you are using Fedora Linux, try the following dnf command:
$ dnf list installed
$ dnf list installed htop

See also:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Category List of Unix and Linux commands
Documentation help • mandb • man • pinfo
Disk space analyzers df • duf • ncdu • pydf
File Management cat • cp • less • mkdir • more • tree
Firewall Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04
Linux Desktop Apps Skype • Spotify • VLC 3
Modern utilities bat • exa
Network Utilities NetHogs • dig • host • ip • nmap
OpenVPN CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04
Package Manager apk • apt
Processes Management bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop
Searching ag • grep • whereis • which
Shell builtins compgen • echo • printf
Text processing cut • rev
User Information groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w
WireGuard VPN Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04

Comments on this entry are closed.

This is my first massage over here& i hope i will get full support.

How to open usermap.cfg file on NetApp server?- As i have to check whether unix user login is mapped correctly with Windows login.

As the main problem which few of the users are having is as below —

They are NOT able to map from Windows any network
drive (unix accounts) due to they have not access to their share drive.

It ask me for login and password, BUT earliear it never asked me for my windows login and password . It’s been working till the end of the year 2006.

Please suggest solutions—–

Many thanks in Advance

just a small addition –

on Gentoo Linux just do a:

or
cat /var/lib/portage/world

on CentOS or other “yum”-based systems:

yum list installed

how to see the programs and features in redhat linux (e.g– in windows we can check the same through control panel–progrmas)

@john: On RedHat – which is a rpm package management based distribution – you should can use i.e.:

to list all installed packages or

to get out details about the installed package.

how do i verify packages that are installed without using rpm, i mean recently i installed squid using make, make all, configure configure-install

after this, how do I check this package is installed?

…this is not possible as installing “by hand” (make install) has nothing to do with a “package” nor package management.

To find out if i.e. squid was installed just try to locate the squid binary by where, locate or find, even if you build and install software from sources by make.

If you use a port management system from i.e. pkgsrc, getoo portage or even FreeBSD the port management counts each modified and installed file of a port to make it possible to see which file belongs to which port (package) or which are installed etc.

this might be another story.

Thank you very much, I have another issue, I have Installed texlive but I still get an error message in my crm ” pdf latex not installed”, so do you know how check if any software is installed or not ? It’s different from packages, isn’t it ?

If you have a list of packages you want to query, it’s much easier to just list them instead of using grep:

rpm -q automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel

Why such a complicated command for rpm-based systems? On my machine (Fedora 20), I can just run rpm -q $, and it’s *much* faster since it doesn’t need to list every package on the system and then grep through it:

[blong@blong-desktop tmp]$ rpm -q vala; echo $?
vala-0.22.1-1.fc20.x86_64
0
[blong@blong-desktop tmp]$ rpm -q missing-package; echo $?
package missing-package is not installed
1

Is this a new feature?

In Debian based distros like Ubuntu, you can find out if a package is installed with:

apacheInstalled=$(dpkg -s apache2 | grep ‘Status: install ok installed’| wc -l)
#change apache2 to the package you are checking for. returns 1 if installed, 0 otherwise.
#script does not have to be running as root… but to change installed stuff… it would.

Источник

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.

Источник

Читайте также:  Tightvnc ��� linux mint
Оцените статью