How to find out the installed packages came from which repository?
Sometimes you might want to know the installed packages came from which repository. This will helps you to troubleshoot when you are facing the package conflict issue.
Because third party vendor repositories are holding the latest version of package and sometime it will causes the issue when you are trying to install any packages due to incompatibility.
Everything is possible in Linux because you can able to install a packages on your system even though when the package is not available on your distribution.
Also, you can able to install a package with latest version when your distribution don’t have it. How?
That’s why third party repositories are came in the picture. They are allowing users to install all the available packages from their repositories.
Almost all the distributions are allowing third party repositories. Some of the distribution officially suggesting few of third party repositories which are not replacing the base packages badly like CentOS officially suggesting us to install EPEL repository.
List of Major repositories and it’s details are below.
CentOS:EPEL, ELRepo, etc is CentOS Community Approved Repositories.
Fedora:RPMfusion repo is commonly used by most of the Fedora users.
ArchLinux:ArchLinux community repository contains packages that have been adopted by Trusted Users from the Arch User Repository.
openSUSE:Packman repo offers various additional packages for openSUSE, especially but not limited to multimedia related applications and libraries that are on the openSUSE Build Service application blacklist. It’s the largest external repository of openSUSE packages.
Ubuntu:Personal Package Archives (PPAs) are a kind of repository. Developers create them in order to distribute their software. You can find this information on the PPA’s Launchpad page. Also, you can enable Canonical partners repositories.
What is Repository?
A software repository is a central place which stores the software packages for the particular application.All the Linux distributions are maintaining their own repositories and they allow users to retrieve and install packages on their machine.
Each vendor offered a unique package management tool to manage their repositories such as search, install, update, upgrade, remove, etc.Most of the Linux distributions comes as freeware except RHEL and SUSE. To access their repositories you need to buy a subscriptions.
Why do we need to enable third party repositories?
In Linux, installing a package from source is not advisable as this might cause so many issues while upgrading the package or system that’s why we are advised to install a package from repo instead of source.
How do we find out the installed packages came from which repository on RHEL/CentOS Systems?
This can be done in multiple ways. Here we will be giving you all the possible options and you can choose which one is best for you.
Method-1: Using Yum Command
RHEL & CentOS systems are using RPM packages hence we can use the Yum Package Manager to get this information.
YUM stands for Yellowdog Updater, Modified is an open-source command-line front-end package-management utility for RPM based systems such as Red Hat Enterprise Linux (RHEL) and CentOS.
Yum is the primary tool for getting, installing, deleting, querying, and managing RPM packages from distribution repositories, as well as other third-party repositories.
# yum info apachetop Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * epel: epel.mirror.constant.com Installed Packages Name : apachetop Arch : x86_64 Version : 0.15.6 Release : 1.el7 Size : 65 k Repo : installed From repo : epel Summary : A top-like display of Apache logs URL : https://github.com/tessus/apachetop License : BSD Description : ApacheTop watches a logfile generated by Apache (in standard common or : combined logformat, although it doesn't (yet) make use of any of the extra : fields in combined) and generates human-parsable output in realtime.
apachetop package is coming from
Method-2: Using Yumdb Command
Yumdb info provides information similar to yum info but additionally it provides package checksum data, type, user info (who installed the package). Since yum 3.2.26 yum has started storing additional information outside of the rpmdatabase (where user indicates it was installed by the user, and dep means it was brought in as a dependency).
# yumdb info lighttpd Loaded plugins: fastestmirror lighttpd-1.4.50-1.el7.x86_64 checksum_data = a24d18102ed40148cfcc965310a516050ed437d728eeeefb23709486783a4d37 checksum_type = sha256 command_line = --enablerepo=epel install lighttpd apachetop aria2 atop axel from_repo = epel from_repo_revision = 1540756729 from_repo_timestamp = 1540757483 installed_by = 0 origin_url = https://epel.mirror.constant.com/7/x86_64/Packages/l/lighttpd-1.4.50-1.el7.x86_64.rpm reason = user releasever = 7 var_contentdir = centos var_infra = stock var_uuid = ce328b07-9c0a-4765-b2ad-59d96a257dc8
lighttpd package is coming from
Method-3: Using RPM Command
RPM command stands for Red Hat Package Manager is a powerful, command line Package Management utility for Red Hat based system such as (RHEL, CentOS, Fedora, openSUSE & Mageia) distributions.
The utility allow you to install, upgrade, remove, query & verify the software on your Linux system/server. RPM files comes with .rpm extension. RPM package built with required libraries and dependency which will not conflicts other packages were installed on your system.
# rpm -qi apachetop Name : apachetop Version : 0.15.6 Release : 1.el7 Architecture: x86_64 Install Date: Mon 29 Oct 2018 06:47:49 AM EDT Group : Applications/Internet Size : 67020 License : BSD Signature : RSA/SHA256, Mon 22 Jun 2015 09:30:26 AM EDT, Key ID 6a2faea2352c64e5 Source RPM : apachetop-0.15.6-1.el7.src.rpm Build Date : Sat 20 Jun 2015 09:02:37 PM EDT Build Host : buildvm-22.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : https://github.com/tessus/apachetop Summary : A top-like display of Apache logs Description : ApacheTop watches a logfile generated by Apache (in standard common or combined logformat, although it doesn't (yet) make use of any of the extra fields in combined) and generates human-parsable output in realtime.
apachetop package is coming from
Method-4: Using Repoquery Command
repoquery is a program for querying information from YUM repositories similarly to rpm queries.
# repoquery -i httpd Name : httpd Version : 2.4.6 Release : 80.el7.centos.1 Architecture: x86_64 Size : 9817285 Packager : CentOS BuildSystem <http://bugs.centos.org> Group : System Environment/Daemons URL : http://httpd.apache.org/ Repository : updates Summary : Apache HTTP Server Source : httpd-2.4.6-80.el7.centos.1.src.rpm Description : The Apache HTTP Server is a powerful, efficient, and extensible web server.
httpd package is coming from
CentOS updates repo.
How to find out the installed packages came from which repository on Fedora System?
DNF stands for Dandified yum. We can tell DNF, the next generation of yum package manager (Fork of Yum) using hawkey/libsolv library for back-end. Aleš Kozumplík started working on DNF since Fedora 18 and its implemented/launched in Fedora 22 finally.
Dnf command is used to install, update, search & remove packages on Fedora 22 and later system. It automatically resolve dependencies and make it smooth package installation without any trouble.
$ dnf info tilix Last metadata expiration check: 27 days, 10:00:23 ago on Wed 04 Oct 2017 06:43:27 AM IST. Installed Packages Name : tilix Version : 1.6.4 Release : 1.fc26 Arch : x86_64 Size : 3.6 M Source : tilix-1.6.4-1.fc26.src.rpm Repo : @System From repo : updates Summary : Tiling terminal emulator URL : https://github.com/gnunn1/tilix License : MPLv2.0 and GPLv3+ and CC-BY-SA Description : Tilix is a tiling terminal emulator with the following features: : : - Layout terminals in any fashion by splitting them horizontally or vertically : - Terminals can be re-arranged using drag and drop both within and between : windows : - Terminals can be detached into a new window via drag and drop : - Input can be synchronized between terminals so commands typed in one : terminal are replicated to the others : - The grouping of terminals can be saved and loaded from disk : - Terminals support custom titles : - Color schemes are stored in files and custom color schemes can be created by : simply creating a new file : - Transparent background : - Supports notifications when processes are completed out of view : : The application was written using GTK 3 and an effort was made to conform to : GNOME Human Interface Guidelines (HIG).
tilix package is coming from
Fedora updates repo.
How to find out the installed packages came from which repository on openSUSE System?
Zypper is a command line package manager which makes use of libzypp. Zypper command provides functions like repository access, dependency solving, package installation, etc.
$ zypper info nano Loading repository data... Reading installed packages... Information for package nano: ----------------------------- Repository : Main Repository (OSS) Name : nano Version : 2.4.2-5.3 Arch : x86_64 Vendor : openSUSE Installed Size : 1017.8 KiB Installed : No Status : not installed Source package : nano-2.4.2-5.3.src Summary : Pico editor clone with enhancements Description : GNU nano is a small and friendly text editor. It aims to emulate the Pico text editor while also offering a few enhancements.
nano package is coming from
openSUSE Main repo (OSS).
How to find out the installed packages came from which repository on ArchLinux System?
Pacman command stands for package manager utility. pacman is a simple command-line utility to install, build, remove and manage Arch Linux packages. Pacman uses libalpm (Arch Linux Package Management (ALPM) library) as a back-end to perform all the actions.
# pacman -Ss chromium extra/chromium 48.0.2564.116-1 The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser extra/qt5-webengine 5.5.1-9 (qt qt5) Provides support for web applications using the Chromium browser project community/chromium-bsu 0.9.15.1-2 A fast paced top scrolling shooter community/chromium-chromevox latest-1 Causes the Chromium web browser to automatically install and update the ChromeVox screen reader extention. Note: This package does not contain the extension code. community/fcitx-mozc 2.17.2313.102-1 Fcitx Module of A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)
chromium package is coming from
ArchLinux extra repo.
Alternatively, we can use the following option to get the detailed information about the package.
# pacman -Si chromium Repository : extra Name : chromium Version : 48.0.2564.116-1 Description : The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser Architecture : x86_64 URL : http://www.chromium.org/ Licenses : BSD Groups : None Provides : None Depends On : gtk2 nss alsa-lib xdg-utils bzip2 libevent libxss icu libexif libgcrypt ttf-font systemd dbus flac snappy speech-dispatcher pciutils libpulse harfbuzz libsecret libvpx perl perl-file-basedir desktop-file-utils hicolor-icon-theme Optional Deps : kdebase-kdialog: needed for file dialogs in KDE gnome-keyring: for storing passwords in GNOME keyring kwallet: for storing passwords in KWallet Conflicts With : None Replaces : None Download Size : 44.42 MiB Installed Size : 172.44 MiB Packager : Evangelos Foutras Build Date : Fri 19 Feb 2016 04:17:12 AM IST Validated By : MD5 Sum SHA-256 Sum Signature
chromium package is coming from
ArchLinux extra repo.
How to find out the installed packages came from which repository on Debian Based Systems?
It can be done in two ways on Debian based systems such as Ubuntu, LinuxMint, etc.,
Method-1: Using apt-cache Command
The apt-cache command can display much of the information stored in APT’s internal database. This information is a sort of cache since it is gathered from the different sources listed in the sources.list file. This happens during the apt update operation.
$ apt-cache policy python3 python3: Installed: 3.6.3-0ubuntu2 Candidate: 3.6.3-0ubuntu3 Version table: 3.6.3-0ubuntu3 500 500 http://in.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages *** 3.6.3-0ubuntu2 500 500 http://in.archive.ubuntu.com/ubuntu artful/main amd64 Packages 100 /var/lib/dpkg/status
python3 package is coming from
Ubuntu updates repo.
Method-2: Using apt Command
APT command stands for Advanced Packaging Tool (APT) which is replacement for apt-get, like how DNF came to picture instead of YUM. It’s feature rich command-line tools with included all the futures in one command (APT) such as apt-cache, apt-search, dpkg, apt-cdrom, apt-config, apt-key, etc..,. and several other unique features. For example we can easily install .dpkg packages through APT but we can’t do through Apt-Get similar more features are included into APT command. APT-GET replaced by APT Due to lock of futures missing in apt-get which was not solved.
$ apt -a show notepadqq Package: notepadqq Version: 1.3.2-1~artful1 Priority: optional Section: editors Maintainer: Daniele Di Sarli <[email protected]> Installed-Size: 1,352 kB Depends: notepadqq-common (= 1.3.2-1~artful1), coreutils (>= 8.20), libqt5svg5 (>= 5.2.1), libc6 (>= 2.14), libgcc1 (>= 1:3.0), libqt5core5a (>= 5.9.0~beta), libqt5gui5 (>= 5.7.0), libqt5network5 (>= 5.2.1), libqt5printsupport5 (>= 5.2.1), libqt5webkit5 (>= 5.6.0~rc), libqt5widgets5 (>= 5.2.1), libstdc++6 (>= 5.2) Download-Size: 356 kB APT-Sources: http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu artful/main amd64 Packages Description: Notepad++-like editor for Linux Text editor with support for multiple programming languages, multiple encodings and plugin support. Package: notepadqq Version: 1.2.0-1~artful1 Status: install ok installed Priority: optional Section: editors Maintainer: Daniele Di Sarli <[email protected]> Installed-Size: 1,352 kB Depends: notepadqq-common (= 1.2.0-1~artful1), coreutils (>= 8.20), libqt5svg5 (>= 5.2.1), libc6 (>= 2.14), libgcc1 (>= 1:3.0), libqt5core5a (>= 5.9.0~beta), libqt5gui5 (>= 5.7.0), libqt5network5 (>= 5.2.1), libqt5printsupport5 (>= 5.2.1), libqt5webkit5 (>= 5.6.0~rc), libqt5widgets5 (>= 5.2.1), libstdc++6 (>= 5.2) Homepage: http://notepadqq.altervista.org Download-Size: unknown APT-Manual-Installed: yes APT-Sources: /var/lib/dpkg/status Description: Notepad++-like editor for Linux Text editor with support for multiple programming languages, multiple encodings and plugin support.
notepadqq package is coming from