pkg_scripts

2022-07-15 12:40 UTC
  • Xyne

Metadata

Description: A collection of pacman and package-related utilities.
Latest Version: 2022
Source Code: src/
Architecture:
  • any
Dependencies:
Optional Dependencies:
Arch Repositories:
  • [xyne-any]
  • [xyne-i686]
  • [xyne-x86_64]
AUR Page: pkg_scripts
Arch Forum Thread: 153687
Tags:

About

This is a collection of Pacman and package-related scripts that I have gradually created, mostly in response to other users on the Arch Linux forum. These were originally located here. New scripts will likely appear on that page before being included in this package.

Help Message (pkg-backup)

$ pkg-backup --help

usage: pkg-backup [-h] [--config <filepath>] [-r] [--noconfirm] <dirpath>

Back up Pacman BACKUP files.

positional arguments:
  <dirpath>            Output directory.

options:
  -h, --help           show this help message and exit
  --config <filepath>  Pacman configuration file. Default: /etc/pacman.conf.
  -r, --restore        Restore files in the output directory to the system.
  --noconfirm          Do not prompt for confirmation when restoring files.

Help Message (pkg-busybox_recovery)

$ pkg-busybox_recovery --help

usage: pkg-busybox_recovery [-h] [-c CONFIG]

Re-install Pacman and its dependencies with busybox to recover a live system.
This script should be run on a working Arch Linux system of the same
architecture as the target system. Read the generated README.txt file for
further instructions.

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Pacman configuration file. Default: /etc/pacman.conf

Help Message (pkg-check_groups)

$ pkg-check_groups --help

usage: pkg-check_groups [-h] [--config <filepath>]
                        <group name> [<group name> ...]

Check pacman group consistency.

positional arguments:
  <group name>         the groups to check

options:
  -h, --help           show this help message and exit
  --config <filepath>  Pacman configuration file. Default: /etc/pacman.conf.

Help Message (pkg-clean_pkg_cache)

$ pkg-clean_pkg_cache --help

usage: pkg-clean_pkg_cache [-h] [-c <path>] [-i] [-f] [-n <int>] [--noconfirm]
                           [-s]
                           <dirpath> [<dirpath> ...]

Pacman package cache cleaning tool.

positional arguments:
  <dirpath>             the directories from which to remove packages

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file
  -i, --installed       only keep installed packages
  -f, --foreign         only keep foreign packages, i.e. those not available
                        in any repo
  -n <int>, --number <int>
                        the number of packages to keep
  --noconfirm           skip confirmation prompt
  -s, --src             clean up source (*.src.*) archives created with
                        "makepkg --source" instead of packages

Help Message (pkg-extract_original)

$ pkg-extract_original -h

usage: /usr/bin/pkg-extract_original [-h | <path to installed file>]

extract the original version of a packaged file

Help Message (pkg-list_dep_dates)

$ pkg-list_dep_dates -h

usage: pkg-list_dep_dates [-h] [-c <path>] [--color] <pkgname> [<pkgname> ...]

Print all dependencies of the given packages in a tree followed by their
installation dates.

positional arguments:
  <pkgname>             the packages to check

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file
  --color               Produce colorized output.

Help Message (pkg-list_dependents)

$ pkg-list_dependents -h

usage: pkg-list_dependents [-h] [-c <path>] [-e] [-d]
                           <pkgname> [<pkgname> ...]

List installed packages that depend on the given packages, either directly or
indirectly.

positional arguments:
  <pkgname>             the target dependency

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file
  -e, --explicit        Only list explicitly installed packages.
  -d, --deps            Only list implicitly installed packages, i.e.
                        dependencies.

Help Message (pkg-list_incomplete_packages)

$ pkg-list_incomplete_packages -h

usage: pkg-list_incomplete_packages [-h] [-c <path>]

List all packages with missing installed files.

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file

Help Message (pkg-list_missing_deps)

$ pkg-list_missing_deps -h

usage: pkg-list_missing_deps [-h] [-c <path>] [-o] [-q] [<pkgname> ...]

Print unsatisfied dependencies.

positional arguments:
  <pkgname>             the packages to check

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file
  -o, --object          Check object dependencies too.
  -q, --quiet           Suppress version specification.

Help Message (pkg-list_providers)

$ pkg-list_providers -h

usage: pkg-list_providers [-h] [-c <path>] [-l] <pkgname> [<pkgname> ...]

List providers of the given packages.

positional arguments:
  <pkgname>             the target dependency

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file
  -l, --local           Search the local database.

Help Message (pkg-list_true_orphans)

$ pkg-list_true_orphans -h

usage: pkg-list_true_orphans [-h] [-c <path>]

List packages that are installed as dependencies but which are not deps or
optdeps of other packages.

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file

Help Message (pkg-list_unpackaged_files)

$ pkg-list_unpackaged_files -h

usage: pkg-list_unpackaged_files [-h] [-e] [-i <glob pattern>] [-c <path>]
                                 <dirpath> [<dirpath> ...]

List unpackaged files in given directories.

positional arguments:
  <dirpath>             directories to search

options:
  -h, --help            show this help message and exit
  -e, --empty           list empty directories
  -i <glob pattern>, --ignore <glob pattern>
                        glob patterns to ignore
  -c <path>, --config <path>
                        Pacman configuration file

Help Message (pkg-topological_reinstall)

$ pkg-topological_reinstall -h

usage: pkg-topological_reinstall [-h] [-c <path>] [-o <path>]
                                 <pkgname> [<pkgname> ...]

Generate scripts for toplogical re-installation of the given packages.

positional arguments:
  <pkgname>             the packages to reinstall

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file
  -o <path>, --out <path>
                        The output directory. Default: .

Help Message (pkg-list_unrebuilt)

$ pkg-list_unrebuilt -h

usage: pkg-list_unrebuilt [-h] [-c <path>] [-f] [-s] [-g] [<pkgname> ...]

List all packages older than at least one of their dependencies.

positional arguments:
  <pkgname>             Limit output to the given dependencies.

options:
  -h, --help            show this help message and exit
  -c <path>, --config <path>
                        Pacman configuration file. Default: /etc/pacman.conf
  -f, --foreign         Limit output to foreign packages.
  -s, --shared          Limit ouput to packages depending on shared objects
                        (.so)
  -g, --graph           Print a directed graph in graphviz dot format.

Help Message (db-check_sigs)

$ db-check_sigs -h

usage: db-check_sigs [-h] [-v] [database, database, ...]
  Check signature entries in the given pacman databases against the signature
  files in the same directory.

    -v  Increase verbosity. Pass multiple times for more.

Help Message (db-abs_path)

$ pkg-abs_path -h

usage: pkg-abs_path [-h] [--config <filepath>] [--ttl TTL]
                    pkgname [pkgname ...]

Get the ABS path of selected packages.

positional arguments:
  pkgname

options:
  -h, --help           show this help message and exit
  --config <filepath>  Pacman configuration file. Default: /etc/pacman.conf.
  --ttl TTL            Time-to-live of the cached data in days. For ABS paths
                       this should be at least a day. Default: 1.

CHANGELOG

2022-01-20

  • Fix bug in pkg-extract_original when filename contains a colon.

2015-12-06

  • added db-check_sigs

2014-12-25

  • added pkg-simple_search
  • added pkg-busybox_recovery

2014-08-08

  • update algorithm for listing pkg-list_unrebuilt_packages
  • changed default output of pkg-list_unrebuilt_packages to simple list
  • added pkg-list_anachronistic

2014-07-28

  • added pkg-list_missing_deps

2014-05-01

  • added pkg-list_dependents

2014-02-01

  • added pkg-list_unrebuilt

2014-01-26

  • added pkg-extract_description
Contact
echo xyne.archlinux.org | sed 's/\./@/'
Validation
XHTML 1.0 Strict CSS level 3 Atom 1.0