Unix check if package installed




















OMG it's the 21st century, can't they have a proper option to tell if a package is installed so I don't have write functions or one liners!? Gerald Schade Gerald Schade 1 1 gold badge 6 6 silver badges 7 7 bronze badges.

Definitely faster, because rpm is local package manager. Zlemini Zlemini 1 1 silver badge 2 2 bronze badges. A handy script for yum:! G-Man Says 'Reinstate Monica' Fever Fever 11 1 1 bronze badge. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.

The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.

Package installation on Linux sometimes fails with error package is already installed; nothing to do. To avoid this you need to first check if the package is installed on system or not and then attempt its installation. In this article, we will be seeing different ways we can check if the package is installed on the server and also check its installation date.

We are using -qa i. We are grepping out our desired telnet in this example package name. If the output is blank then the package is not installed. To understand what these numbers in package name mean read package naming conventions. Or even directly querying the package name will yield you the same result as the second example above.

Section: Packages are classified by categories; currently available categories include admin, database, cli-mono, debug, devel, doc, editors, education, gnustep, embedded, fonts, games, gnome, gnu-r, electronics, graphics, interpreters, hamradio, haskell, httpd, python, introspection, javascript, java, ruby, kde, localization, kernel, libdevel, libs, lisp, mail, math, metapackages, ocaml, net, news, misc, comm, oldlibs, otherosfs, perl, php, rust, science, shells, sound, text, video, tasks, tex, utils, vcs, web, x11, xfce, and zope.

Installed size: You can see the estimated required disk space in bytes to install the package. You can also use the dpkg command followed by the -l flag to check a specific package status, as shown in the example below. The dpkg-query command can be used to show if a specific package is installed in your system.

To do it, run dpkg-query followed by the -l flag and the name of the package you want information about. The example below shows how to check if the Steam package is installed. You can use the same command to list all installed packages by omitting the package name, as shown in the example below. The apt-cache command can also show information on packages, installed versions, and more.



0コメント

  • 1000 / 1000