APT-SORTPKGS(1)

๐Ÿ’… APT-SORTPKGS ๐Ÿ’…

okay so bestie, you know how package index files can be a whole mess? this little icon right here, apt-sortpkgs, is about to be your new bestie for fixing that. it lives in the APT family and honestly? it's giving "organized queen" energy. โœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

apt-sortpkgs [-s] [-o=config_string] [-c=config_file] filename...
             {-v | --version} {-h | --help}

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so picture this: you've got an index file (could be a source index or a package index, both slay) and it's just... vibing there in whatever order it wants. apt-sortpkgs takes that file and sorts the records by package name. lowkey iconic. ๐Ÿ”ฅ

but wait, there's more โ€” it also sorts the internal fields of each record according to the internal sorting rules. like, it doesn't just fix the outside, it fixes the inside too. self-care for your package index, fr fr. ๐ŸŽ€

all output goes to standard output, bestie. and real talk: the input must be a seekable file. no cap. so pipe it from stdin and it simply won't work. you've been warned. ๐Ÿ’€


โœจ OPTIONS โœจ

okay so here's the thing โ€” every single one of these command line options can also be set using the configuration file. the descriptions tell you which configuration option to set, iykyk.

and for boolean options? you can override the config file by using something like -f-,--no-f, -f=no or several other variations. so many options, it's giving "choose your own adventure". ๐Ÿ™ˆ

  • -s, --source โ€” use source index field ordering. configuration item: APT::SortPkgs::Source. simple as that, bestie. ๐Ÿซถ
  • -h, --help โ€” shows a short usage summary. for when you're like "help me help me" and it's like "here's the basics". ๐Ÿ˜ญ
  • -v, --version โ€” shows the program version. classic, iconic, no notes. ๐Ÿ’œ
  • --audit โ€” show audit (and notice) messages. this one overrides the quiet option, but only for notice messages, not progress ones. very specific, very demure. ๐Ÿ’…
  • -c, --config-file โ€” configuration file time! specify a config file to use. the program reads the default configuration file and then this configuration file. and listen โ€” if configuration settings need to be set before the default configuration files are parsed, specify a file with the APT_CONFIG environment variable. see apt.conf(5) for syntax info. so much to know, but you got this. ๐ŸŒˆ
  • -o, --option โ€” set a configuration option, and honestly? it's giving "arbitrary power". the syntax is -o Foo::Bar=bar. and -o and --option can be used multiple times to set different options. stack 'em up, bestie. โญ
  • --cli-version โ€” requests a specific CLI version. this is a pattern that takes a MAJOR.MINOR version. you may omit the MINOR version, in which case the latest supported minor level will be used. โœจ

version tracks are presented as follows: the version 3.2 has equivalent versions 0.32, 1.22, and 2.12, implementing new features for their specified major versions.

special case alert ๐Ÿšจ: the X.9 version pattern. a version like 2.9 is followed by 3.0, but 2.10 follows directly on 2.8 โ€” given that we use odd version numbers as development series (2.9 is the 3.0 development series). so don't get it twisted. ๐ŸŒ€

this feature has been introduced in APT 3.1.10, and replaces the binary-specific configuration. you may use the APT::Version to similar effect on older binaries, for example, use -o APT::Version=2 to make apt(8) behave like the 2.x series.

the default value is the current APT version for apt(8) and 0.(10 * major + minor) for the classic commands. the 0.X series is soft-deprecated and the other commands will roll over to the 2.x series in the future. so heads up, bestie. ๐Ÿ“ข

  • --no-color, --color โ€” turn colors on or off. colors are on by default on supported terminals for apt(8) and can also be disabled using the NO_COLOR or APT_NO_COLOR environment variables, or further configured by the APT::Color configuration option and scope. see apt.conf(5) for information on that. aesthetic choices are valid. ๐ŸŽจ

๐Ÿ” SEE ALSO ๐Ÿ”

apt.conf(5) โ€” the bestie you should also check out, no cap. ๐Ÿ“–


๐Ÿ’€ DIAGNOSTICS ๐Ÿ’€

apt-sortpkgs returns zero on normal operation, decimal 100 on error. so if you see that 100, something went wrong and you should probably look into it. keeping it real. ๐Ÿ‘‘


๐Ÿ› BUGS ๐Ÿ›

APT bug page[1]. if you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command. don't be shy, they actually want to hear from you. ๐Ÿ’–


๐Ÿงš AUTHORS ๐Ÿงš

Jason Gunthorpe

APT team

like, legends only. respect. ๐Ÿซก


๐Ÿ“ NOTES ๐Ÿ“

  1. APT bug page https://bugs.debian.org/src:apt

and that's the whole page, bestie! written with ๐Ÿ’– by your favorite Unix bestie, based on APT 3.3.4 dated 30 November 2013 โ€” iconic since day one. periodt. โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from