APT-SHOW-VERSIONS(1p)

πŸ“¦
version 0.22.16 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– APT-SHOW-VERSIONS πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation section β€” the command is apt-show-versions and it's about listing available package versions with their distribution. it's giving "I know exactly which of ur packages is from where and which ones can level up." πŸŽ€


🌸 NAME 🌸

apt-show-versions β€” lists available package versions with distribution. periodt. πŸ’…


✨ DESCRIPTION ✨

so like, apt-show-versions parses the dpkg status file and the APT lists for the installed and available package versions and distribution, and then it shows u the upgrade options within the specific distribution of the package u selected. it's literally doing the detective work for u. πŸ”

this is really useful if u have a mixed stable/testing environment and want to list all packages which are from testing and can be upgraded in testing. like, ur whole setup is a lil chaotic and u need someone to sort it out? yeah. that's this. πŸ¦‹

okay so important thing: apt-show-versions uses caching for the status information of installed and available packages. here's the vibe check on that:

  • if u run apt-show-versions as root, the cache is updated as needed.
  • if u run as non-root, it uses the newest available information, but it can't update the cache.
  • if u run as root with the option -i, the cache is initialized or updated only.

no cap, read those three again if u need to. πŸ™ˆ


🌈 SYNOPSIS 🌈

apt-show-versions [-h] [[-p] package name] [-a] [-b]

πŸ‘‘ OPTIONS πŸ‘‘

real talk: if u don't give any options, the status of all installed packages is printed. so it just tells u everything by default. main character behavior honestly.

  • -p package, --package=package β€” print available and installed versions for the specified package. u can also just specify a package name without the option -p. and if -p and a package name are both missing, all installed packages are displayed.
  • -r, --regex β€” interpret package from option -p as a regex. 🧚
  • -R, --regex-all β€” like --regex, but also shows matching packages which are not installed.
  • -u, --upgradeable β€” print only upgradeable packages. the glow-up list. ✨
  • -a, --allversions β€” print all available versions of the selected packages.
  • -b, --brief β€” print only package_name/distribution for upgradeable packages. short and sweet, we love a concise queen. πŸŽ€
  • -v, --verbose β€” prints out messages about which package files are parsed.
  • -V, --version β€” prints out version of apt-show-versions.
  • -i, --initialize β€” initialize or update package cache only (as root). do this every time when the status of the installed or available packages has changed. initialization is done automatically on installation of the package and via a cron.daily job, so like, it's mostly handled, but now u know. πŸ’…
  • -stf file, --status-file=file β€” use file as the dpkg status file instead of /var/lib/dpkg/status.
  • -ld directory, --list-dir=directory β€” use directory as path to apt's list files instead of /var/state/apt/lists/ or /var/lib/apt/lists/.
  • -h, --help β€” prints out command-line help.

πŸ’€ EXIT CODES πŸ’€

  • 0 β€” no error. slay. 🫢
  • 1 β€” wrong usage.
  • 2 β€” apt-show-versions has been called with exactly one package and the upgradeable option set, but the package is uptodate. as no output has been requested, this case gets signaled using the exit code. sneaky but valid. 😭
  • 255 β€” unspecified error.

πŸ“ EXAMPLES πŸ“

if u want to know for all ur installed packages whether they are uptodate or upgradeable, use:

apt-show-versions

if u want to have a list of all upgradeable packages:

apt-show-versions -u

to get a list of all available versions of libc6:

apt-show-versions -a -p libc6

to get information about several packages:

apt-show-versions dpkg apt

apt-show-versions -r ^texlive

to upgrade all packages in testing:

apt-get install `apt-show-versions -u -b | grep testing`
bestie that last one has a backtick subshell in it, so make sure ur typing it exactly as shown or ur shell will be so confused. πŸ™ˆ

🧚 AUTHOR 🧚

Christoph Martin, martin@uni-mainz.de β€” thank u king, we appreciate u. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

apt(8), dpkg(1)


okay that's the whole page!! πŸ’– this doc came from the perl v5.40.1 manual set, dated 2025-08-17 β€” so go forth, check ur versions, and remember: a mixed stable/testing environment is not a mess, it's a vibe. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from