find-repos-of-install - Linux


Overview

find-repos-of-install is a versatile command-line utility that aids in locating the software repositories from which packages were installed on a Linux system. It provides valuable information on package management and is particularly useful for tracking dependencies, resolving conflicts, and maintaining system integrity.

Syntax

find-repos-of-install [options] [package1] [package2] ... [packageN]

Options/Flags

| Flag | Description | Default |
|—|—|—|
| -a | Retrieve repositories for all installed packages | False |
| -i | Include the distribution or vendor name | False |
| -p | Search for patterns in package names (wildcard characters allowed) | N/A |
| -r | Recursively list repositories of dependent packages | False |
| -v | Verbose output, showing more details | False |
| -h | Display usage help | N/A |

Examples

1. Find repositories for a specific package:

find-repos-of-install nginx

2. Retrieve repositories for multiple packages:

find-repos-of-install vim nano curl

3. Search for packages with matching names:

find-repos-of-install -p "libreoffice*"

4. Recursively list repositories for dependent packages:

find-repos-of-install -r nodejs

Common Issues

1. No repositories found: Ensure that the packages are installed and that the system package database is up-to-date.

2. Conflicting package names: If multiple packages share the same name, specify the full package names or use patterns to filter the results.

Integration

find-repos-of-install can be integrated with other commands to perform advanced tasks:

  • With rpm: Combine with rpm -q --qf "%{name}-%{version}-%{release}.%{arch}.rpm" | find-repos-of-install to find repositories for RPM packages.
  • With dpkg: Use dpkg-query -f '${Package}-(${Version})' | find-repos-of-install to retrieve repositories for Debian packages.

Related Commands

  • rpm – Package manager for Red Hat-based systems
  • dpkg – Package manager for Debian-based systems
  • yum – Command-line interface for RPM-based package management
  • apt – Command-line interface for Debian-based package management