APT-SHOW-VERSIONS(1p)
π 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-versionsas 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.
-ppackage,--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-pand a package name are both missing, all installed packages are displayed.-r,--regexβ interpret package from option-pas 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 ofapt-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. π-stffile,--status-file=file β use file as the dpkg status file instead of/var/lib/dpkg/status.-lddirectory,--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-versionshas 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 π₯
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
- ubuntu resolute: apt-show-versions 0.22.16
- ubuntu stonking: apt-show-versions 0.22.16
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms