APT-LISTCHANGES(1)

๐Ÿ“ฆ
version 4.8 ยท 4 versions
, in ubuntu resolute, ubuntu stonking

๐Ÿ’– APT-LISTCHANGES ๐Ÿ’–

okay bestie, gather round, because this is the apt-listchanges manual page (the APT-LISTCHANGES(1) one, from the Debian section, obviously) and it's literally about showing you what changed in a package before you commit. no cap. let's get into it ๐ŸŽ€


โœจ NAME โœจ

apt-listchanges โ€” show new changelog entries from Debian package archives. that's it, that's the whole vibe. she shows you what's new. ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

apt-listchanges [[options...]] {[--apt] | [package.deb...]}

like, options go here, and then EITHER --apt OR a bunch of .deb files. pick a lane babe ๐Ÿ’œ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so apt-listchanges is a tool that shows you what's been changed in a new version of a Debian package, compared to the version you've currently got installed. it's giving "here's the tea before you upgrade." โœจ

how does she do it? she extracts the relevant entries from both the NEWS.Debian and changelog[.Debian] files โ€” which are usually chillin' in /usr/share/doc/package โ€” and she pulls them from Debian package archives.

โš ๏ธ important bestie: in the default installation, if apt-listchanges runs during upgrades as an APT plugin, it displays NEWS.Debian entries only. that's the default!! if you want something else, hit it with the --which option.

and if changelog entries are being displayed and the package doesn't contain a changelog[.Debian] file, apt-listchanges calls the apt-get changelog command to download the changelog from the network. you can turn this off with the --no-network option. ๐Ÿซถ

now, when you hand her a set of filenames as arguments (or she reads them from apt when you use --apt), she'll scan those files โ€” which are assumed to be Debian package archives โ€” for the relevant changelog entries, and display them all in a summary grouped by source package. the groups are sorted by the urgency of the most urgent change, and then by the package name. changes within each package group are displayed in the order they appear in the changelog files, i.e. starting from the latest and going down to the oldest. the --reverse option can be used to flip that order. iconic sorting behavior honestly ๐ŸŒˆ


๐Ÿ’… OPTIONS ๐Ÿ’…

apt-listchanges provides the following options to control her behavior. most of them have their equivalent entries in the configuration file โ€” peep the "CONFIGURATION FILE" section below for the details, iykyk.

  • --apt โ€” read filenames from a specially-formatted pipeline (as provided by apt), rather than from command line arguments, and honor certain apt-specific options in the config file. this pipeline must be in "version 2" format, specified in the apt configuration. no version 1 babe, we don't do that here ๐Ÿ’€
  • -v, --verbose โ€” display additional (usually unwanted) information. for instance, print a message when a package of the same or older version is to be installed, or when a package is to be newly installed. it's the "hey bestie just so you know" mode ๐Ÿ—ฃ๏ธ
  • -f, --frontend โ€” select which frontend to use to display information to the user. the current frontends include:
    • pager โ€” uses the sensible-pager(1) command to display output. the command uses the PAGER environment variable to choose your favourite pager. the "pager" option may be specified in the configuration file to select a specific pager for use with apt-listchanges. ๐Ÿ“–
    • browser โ€” displays an HTML-formatted changelog with hyperlinks for bugs and email addresses, using the sensible-browser(1) command that examines the BROWSER environment variable to choose your favourite browser. the "browser" option may be specified in the configuration file to select a specific browser for use with apt-listchanges. ๐ŸŒ
    • xterm-pager โ€” uses your favorite pager to display output, but does so in an xterm (using the x-terminal-emulator alternative) in the background. this lets you go on with the upgrade if you like, and continue to browse the changelogs. you can override the terminal emulator to be used with the "xterm" configuration option. ๐Ÿ’ป
    • xterm-browser โ€” the logical combination of xterm-pager and browser. only appropriate for text-mode browsers, so don't get cute with it ๐ŸŒธ
    • text โ€” dumps output to stdout, with no pauses. just raw, unfiltered output energy โšก
    • syslog โ€” dumps output to syslog. disabling the titled option is recommended.
    • log โ€” appends output to a log file, with an optional filter process. disabling the titled option is recommended. ๐Ÿ“
    • mail โ€” sends mail to the address specified with --email-address, and does not display changelogs. she's shy like that ๐Ÿ’Œ
    • gtk โ€” spawns a gtk window to display the changelogs. needs python3-gi to be installed. ๐Ÿ‘‘
    • none โ€” does nothing. can be used to prevent apt-listchanges from running when configured to run automatically from apt. the ultimate "not me, not today" frontend ๐Ÿ’€
please note that apt-listchanges will try to switch to an unprivileged user before spawning commands in the "browser", "xterm-browser", and "xterm-pager" frontends. however, this currently does not apply to the "pager" frontend. see also "ENVIRONMENT VARIABLES" below. ๐Ÿ”
  • --hide โ€” for frontends which support it (currently only gtk), hide the window by default. peekaboo but make it quiet ๐Ÿซฃ
  • --email-address=address โ€” in addition to displaying it, mail a copy of the changelog data to the specified address. to only mail changelog entries, use this option with the special frontend 'mail'. โœ‰๏ธ
  • --email-format={text|html} โ€” if sending mail copies is enabled (see --email-address above), this option selects whether the mail should be sent as good old plain text data (which is the default behavior), or as html data with clickable links, which might be more convenient for people using graphical mail clients. pick your fighter ๐Ÿ’…
  • -c, --confirm โ€” once changelogs have been displayed, ask the user whether or not to proceed. if the user chooses not to proceed, a nonzero exit status will be returned, and apt will abort. she's asking permission bestie, respect it ๐Ÿ›‘
  • -a, --show-all โ€” rather than trying to display changelog entries that are newer than the currently installed version of the package, simply display all changelog entries for all packages. this is useful for viewing the entire changelog of a .deb before extracting it. the "give me everything" option ๐ŸŒˆ
  • -n, --no-network โ€” in rare cases when a binary package (or to be more precise: none of the binary packages built from the same source package that are processed together as a group) does not contain a changelog file, apt-listchanges by default executes apt-get changelog to download changelogs from the network servers usually provided by your operating system distribution. this option will disable this behavior, which might be useful for example for systems behind a firewall. stay offline, stay safe ๐Ÿ”ฅ
  • --save-seen=file โ€” this option will cause apt-listchanges to keep track of the last version of a package for which changelogs have been displayed, to avoid redisplaying the same changelogs in a future invocation. the database is stored in the named file. specify 'none' to disable this feature. memory queen ๐Ÿง 
  • --dump-seen โ€” display the contents of the seen database to standard output as a list of lines consisting of source package name and its latest seen version, separated by space. this option requires the path to the seen database to be known: please either specify it using the --save-seen option or pass --profile=apt option to have it read from the configuration file. ๐Ÿ—‚๏ธ
  • --since=version โ€” this option will cause apt-listchanges to show the entries later than the specified version. with this option, the only other argument you can pass is the path to a .deb file. that's the rule, don't fight it โœจ
  • --latest=N โ€” this option will cause apt-listchanges to show only the latest N entries. just the freshest drops ๐Ÿ’ง
  • --which={news|changelogs|both} โ€” this option selects whether news (from NEWS.Debian et al.), changelogs (from changelog.Debian et al.) or both should be displayed. the default is to display news when running as an APT plugin, or both otherwise. ๐Ÿ—ž๏ธ
  • --help โ€” displays syntax information. the classic, the icon, the legend ๐Ÿ’–
  • -h, --headers โ€” these options will cause apt-listchanges to insert a header before each package's changelog showing the name of the package, and the names of the binary packages which are being upgraded (if there is more than one, or it differs from the source package name). she's labeling everything so you're never confused ๐Ÿท๏ธ
  • --debug โ€” display some debugging information. for when you're in your detective era ๐Ÿ•ต๏ธ
  • --profile=name โ€” select an option profile. name corresponds to a section in /etc/apt/listchanges.conf. the default when invoked from apt is "apt", and "cmdline" otherwise. ๐Ÿ“
  • --log=file โ€” select the file appended to by the log frontend. the default is /var/log/apt/listchanges.log. the filter command option can be used to modify the output before it is appended to the log file. please ensure that you setup log rotation for this file. don't let it grow forever bestie, she'll eat your disk ๐Ÿ˜ญ
  • --filter=command โ€” select the command used to filter output before it is appended to the log file by the log frontend. stdin will receive the apt-listchanges output and stdout will be appended to the log file. separate arguments with spaces and quote arguments containing spaces. the command will not be run using the shell unless the shell is included in the command: sh -c 'date ; cat'. read that again, it matters ๐Ÿš
  • --reverse โ€” show the changelog entries in reverse order. oldest to newest, the chaotic way ๐Ÿ”„
  • --ignore-apt-assume, --ignore-debian-frontend โ€” disable forcing non-interactive frontend in some of the cases described in the "AUTOMATIC FRONTEND OVERRIDE" section below. basically "let me live" ๐Ÿ•Š๏ธ
  • --titled, --untitled โ€” enable or disable the title at the beginning of the output. title on, title off, your call ๐Ÿ’ซ
  • --select-frontend โ€” choose frontend interactively. this option is mainly for testing purposes, please do not use it. like she literally said please. don't. ๐Ÿ™ˆ

๐ŸŽ€ AUTOMATIC FRONTEND OVERRIDE ๐ŸŽ€

for a better integration with existing package management tools, apt-listchanges tries to detect if package upgrades are done in a non-interactive way, and automatically switches its frontend to 'text' when any of the following conditions is satisfied:

  • the standard output is not connected to terminal;
  • the --quiet (-q) option is given to apt-get(8) (or aptitude(8)); note however that when the option is used more than once, apt-listchanges switches the frontend to 'mail'; ๐Ÿ“ง
  • the --assume-yes (-y) option is given to apt-get(8);
  • the DEBIAN_FRONTEND environment variable is set to "noninteractive", and APT_LISTCHANGES_FRONTEND is not set.

for backward compatibility purposes the last two of the above checks can be disabled either with "ignore_apt_assume=true" or "ignore_debian_frontend=true" configuration file entries (see "CONFIGURATION FILE" below) or by using the command line options: --ignore-apt-assume or --ignore-debian-frontend. ๐Ÿซถ

please also note that the "mail" frontend is already non-interactive one, so it is never switched to the "text" frontend. she knows what she is ๐Ÿ’…

additionally, apt-listchanges overrides X11-based frontends ("gtk", "xterm-pager", "xterm-browser") with "pager" (or "browser" in case of "xterm-browser") when the environment variable DISPLAY is not set. no display, no drama ๐Ÿ–ฅ๏ธ

please note that these silent frontends are not subject to the overrides: syslog, log. they stay quiet and unbothered โœจ

๐ŸŽ€ CONFIGURATION FILE ๐ŸŽ€

ok so apt-listchanges gets all its settings from /etc/apt/listchanges.conf, bestie. The file is built out of sections, and a section is just a name wrapped in square brackets. Inside each section you write lines in the key=value format. Anything on a line that starts with # is a comment and gets ignored, no questions asked. And there's a whole mood for override files: any file named name.conf inside the /etc/apt/listchanges.conf.d directory gets read the same way, and whatever it says overrides the values you set in the main config file. ๐Ÿ˜ค

So a Section is the name of a profile, and you can hand that name to the --profile option and it's like, "okay, that one." ๐Ÿ’…

The config for the "apt" section can literally be managed by debconf(7), and most of the settings hanging out in there can be changed with the help of the command dpkg-reconfigure apt-listchanges.

A Key is the name of some command-line option (with these exceptions, bestie: --apt, --profile, and --help are NOT keys), with the leading hyphens chopped off and any hyphens left over translated into underscores. So for example: email_format or save_seen. โœจ

A Value is the value of that corresponding option. For command-line options that don't take an argument โ€” like confirm or headers โ€” you set the value to either 1, yes, true, or on to turn the option on, or to 0, no, false, or off to turn it off. That's the vibe check. ๐Ÿซถ

On top of all that, a key can also be one of these special keywords: browser, pager, or xterm. When you use one of those, the value of the config entry should be the name of the appropriate command, optionally followed by its arguments, like so: pager=less -R. Periodt. ๐Ÿ’–

๐ŸŒธ Example 1. Example configuration file ๐ŸŒธ

[cmdline]
frontend=pager

[apt]
frontend=xterm-pager
email_address=root
confirm=1

[custom]
frontend=browser
browser=mozilla

ok so what that gorgeous little file is saying: in command-line mode, the default frontend is "pager". In apt mode, the xterm-pager frontend is the default, a copy of the changelogs (if there even are any) should get emailed to root, and apt-listchanges should ask for confirmation before doing its thing. And if you invoke apt-listchanges with --profile=custom, the browser frontend gets used instead, and it'll invoke mozilla. iconic. ๐Ÿ‘‘


๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • APT_LISTCHANGES_FRONTEND โ€” the frontend to use. simple as that bestie ๐Ÿ’…
  • APT_LISTCHANGES_USER, SUDO_USER, USERNAME โ€” the value of the first one of these that actually exists is used as the name of the user to switch to when running commands spawned by the "browser", "xterm-browser", and "xterm-pager" frontends, but only if apt-listchanges was started by a privileged user. yes this is very specific, no we will not be skipping it ๐Ÿ˜Œ
  • DEBIAN_FRONTEND โ€” if you set this to "noninteractive", it can force apt-listchanges to use a non-interactive frontend. go read the "AUTOMATIC FRONTEND OVERRIDE" section for the details, iykyk ๐Ÿงš
  • BROWSER โ€” used by the browser frontend, and you should set it to a command that expects a file: URL pointing at an HTML file to display. ๐Ÿฆ‹
  • PAGER โ€” used by the pager frontend. that's it, that's the whole job ๐ŸŒธ
  • APT_HOOK_INFO_FD โ€” the file descriptor to read package names from when you're in --apt mode. (Apt is expected to set this variable to a proper file descriptor number, so like, don't stress about it, that's apt's problem not yours.) ๐Ÿ’€

โญ SEEN DATABASE INITIALIZATION โญ

Okay so picture this: apt-listchanges gets installed for the very first time, or it gets upgraded from some old version that wasn't using the current seen database format. In that case it enables a systemd timer called apt-listchanges.timer, which tries hourly to activate apt-listchanges.service. And what does that service do? It scans the changelog and NEWS files of all your installed packages and uses their contents to populate the seen database. yes, all of them. it's giving main character energy, honestly. ๐Ÿ‘‘

Pre-populating the database like this makes apt-listchanges run faster, because then it doesn't have to sit there parsing the changelog and NEWS files of every currently-installed package during upgrades just to figure out which new entries to display. huge time save, no cap. ๐Ÿ”ฅ

And bestie, this pre-populating thing should only ever need to happen once on any given host, because from that point forward apt-listchanges updates the database automatically as part of upgrades. So the moment the service runs successfully to completion, the timer just... automatically disables itself. self-care. ๐Ÿ’…

BUT. If for some reason you believe the apt-listchanges seen database is incomplete or inaccurate โ€” like it's giving sus energy โ€” you can rebuild it by removing /var/lib/apt/listchanges and then executing:

systemctl start apt-listchanges.service
โš ๏ธ heads up: that runs to completion in the foreground. so like, it will be right there in front of you the whole time. no background sneaky business. ๐Ÿ˜ญ

๐Ÿ’– FILES ๐Ÿ’–

  • /etc/apt/listchanges.conf โ€” the configuration file. the main one. the queen. ๐Ÿ‘‘
  • /etc/apt/listchanges.conf.d/*.conf โ€” configuration file override files.
  • /etc/apt/apt.conf.d/20listchanges โ€” the file used for registering apt-listchanges into the apt system.
  • /var/lib/apt/listchanges โ€” the database used for save-seen.

๐Ÿซถ AUTHOR ๐Ÿซถ

apt-listchanges was written by Matt Zimmerman <mdz@debian.org>

The current maintainer is Jonathan Kamens <jik@kamens.us>


๐ŸŒŸ SEE ALSO ๐ŸŒŸ

sensible-pager(1), sensible-browser(1), apt-get(8), aptitude(8)


and that's the whole page bestie, you ate it, you understood it, you're officially an apt-listchanges girlie now ๐ŸŽ€ this lil manual page is from the apt-listchanges package, dated 2017-07-08, and it lives on the page APT-LISTCHANGES(1) ๐Ÿ’œ mwah, go forth and read your changelogs โœจ

๐Ÿ“ฆ where this page comes from