PORG(8)
π PORG β the source code package organizer, bestie edition π
okay so listen. porg is section 8 of the manual, it's a system thing, and it's literally your new best friend for installing stuff from source. let's get into it β¨
πΈ SYNOPSIS πΈ
porg [OPTIONS] <packages>
porg -l [OPTIONS] <package> <command>
porg -q <files>
π DESCRIPTION π
Porg is a program that helps you with package management when you're installing packages from source code. yes, from source. we're doing it the hard way and we're slaying at it. π«Ά
when you install a package, you can run porg in log mode (that's the -l option) to wrap the install command β like, say, "make install" β and it logs every file that got created into a text database. no cap, it just keeps track. π
porg also gives you options for printing package information, printing package files, removing packages, or querying who owns a file. like a little detective. π
the special option '--' forces an end of option-scanning. this is super useful when you're entering the install command in log mode and porg is out here trying to read your flags as its own. π
also, mandatory arguments to long options are mandatory to short options too. rules are rules. π
β¨ GENERAL OPTIONS β¨
-a,--allβ apply to all installed packages (not with-r).-L,--logdir=DIRβ the base log directory. the logs for the installed packages get saved here. default is/var/lib/porg, unless the variableLOGDIRis set in the configuration file (typeman porgrcfor more info, iykyk).-v,--verboseβ verbose output. and-vvprints debugging messages too. yes, double it. π-x,--exact-versionβ disable expansion of the package version (not with-l). by default, porg automatically expands the package names you give it as arguments, adding all the versions of the package that are registered in the porg database. for instance, iffoo-1.0andfoo-2.0are installed, the commandporg -r foowould remove both packages, andporg -r foo-1would remove onlyfoo-1.0. the-xoption inhibits this expansion, so package names must match the basename and the whole version of a registered package. strict queen behavior. π-h,--helpβ display a help message and exit.-V,--versionβ display version information and exit.
π GENERAL LIST OPTIONS π
these options can be used to list packages or files. very "let me see everything" energy. π
-R,--reverseβ reverse the order while sorting.-t,--totalβ print totals at the bottom of the list, when applicable. when printing total sizes, the sizes of hardlinks to installed files are counted only once. efficiency, we love to see it. β¨-z,--no-package-nameβ do not print the name of the package when listing. useful for scripts. no fluff, just data. π§
π¦ PACKAGE LIST OPTIONS π¦
-s,--sizeβ print the installed size of the package. sizes of hardlinks to installed files are counted only once.-F,--nfilesβ print the number of installed files.-d,--dateβ print the installation date of the package. double it (-dd) to print the hour too. double it, bestie. π-S,--sort=WORDβ sort the list by WORD:'name','size','files'or'date'.
πΈ FILE LIST OPTIONS πΈ
-f,--filesβ list the files installed by the package.-s,--sizeβ print the size of each file.-y,--symlinksβ print the contents of symbolic links.-S,--sort=WORDβ sort the list by WORD:'name'or'size'.
π PACKAGE INFORMATION OPTIONS π
only one of these options may be used at once. pick one, bestie. one. π
-i,--infoβ print package information (like summary, author, URLβ¦), if available.-o,--configure-optionsβ print the arguments (command line options and environment variables) passed to the'configure'script when the package was built.-q,--queryβ query for the packages that own the files specified as arguments.
π₯ PACKAGE LOG OPTIONS π₯
-l,--logβ enable log mode. if a shell command is given as an argument, execute and monitor it, logging the created files; otherwise the list of files to be logged is read from the standard input. in either case, the relative paths are automatically resolved. the list of logged files is printed to the standard output, unless any of the-por-Doptions is used, in which case it's assumed that a package is to be registered into the porg database. see EXAMPLES and FILE NAMES WITH SPACES below. π-p,--package=PKGβ specify the name of the package to be logged. with-v, the list of logged files is also printed to the standard error stream. with-vv, porg prints detailed information about the install process. this holds for option-Dtoo.-D,--dirnameβ use the name of the current directory as the name of the package to be logged. main character energy, honestly. β¨-E,--exclude=PATH1:PATH2:...β colon-separated list of paths to skip when logging the installed files. default is/tmp:/dev:/proc:/sys:/run, unless the variableexcludeis set in the configuration file (typeman porgrcfor more information). shell wildcards are allowed in the PATHs. see PATH MATCHING below for more details.-I,--include=PATH1:PATH2:...β colon-separated list of paths to scan when logging the installed files. default is/, unless the variableincludeis set in the configuration file (typeman porgrcfor more information). shell wildcards are allowed in the PATHs. see PATH MATCHING below for more details.-j,--log-missingβ by default, when installing a package, porg registers only those files that exist in the filesystem right after the installation. with this option, porg registers also the missing files. spooky but useful. π»-+,--appendβ with-por-D, if the package is already registered, append the list of created files to its log.
π PACKAGE REMOVE OPTIONS π
-r,--removeβ remove a package, keeping the shared files and asking for confirmation by default. it's polite like that. π«Ά-U,--unlogβ unregister the package from the database, without removing any file. it's just forgetting, not deleting. π-b,--batchβ don't prompt for confirmation when removing or unlogging (and assume yes to all questions). bold. risky. iconic. π-e,--skip=PATH1:PATH2:...β colon-separated list of paths to skip when removing a package. default is''(all logged files are removed), unless the variableremove_skipis set in the configuration file (typeman porgrcfor more information). shell wildcards are allowed in the PATHs. see PATH MATCHING for more details.
π PATH MATCHING π
options -I, -E and -e accept a colon-separated list of paths, each of which may contain shell-like wildcards (*, ? and [..]). files are matched against each of those paths, following the standard shell-like expansion, but with the following exception:
if a path in the list does not contain any wildcard, and it is a directory, it matches any file within that directory.
note that if wildcards are to be used, the whole list of paths must be enclosed in single quotes (') to protect it from being expanded by the shell. protect your paths, bestie. π‘οΈ
π FILE NAMES WITH SPACES π
as of version 0.3, porg accepts filenames with spaces when logging package installations. although IMHO this should be seen as an improvement in general terms, it may cause problems when trying to feed porg -l with a list of files separated by spaces. for example, the following command:
echo /bin/foo /bin/bar | porg -l
would try to log the file "/bin/foo /bin/bar" instead of logging /bin/foo and /bin/bar separately. π to fix this, one may use newlines to separate file names, and pass option -e to echo so it honours escape characters, like this:
echo -e "/bin/foo\n/bin/bar" | porg -l
or either write the list of files separated by newlines into a temporary file, and run:
cat tmpfile | porg -l
β EXAMPLES β
to log the installation of the package 'foo-1.0', which is installed with the command 'make -C src install':
porg -lp foo-1.0 "make -C src install"
note that in this example the quotes are required to prevent porg from considering '-C' as a command line option. the special end-of-option argument '--' may be used for the same purpose:
porg -lp foo-1.0 -- make -C src install
use single quotes if the command already contains double quotes:
porg -lp foo-1.0 'echo "hello world" > /var/log/foo.log'
alternatively, we can use the basename of the current directory as the name of the package to be logged, using the option -D instead of -p:
porg -lD "make install && make install.man"
if we have forgotten to install a file, it can be added to a previously created log with the option -+:
porg -lp+ foo-1.0 "install bar /bin/bar"
note that the option -+ cannot be used to remove a file from the log. for instance, the following command:
porg -lp+ foo-1.0 "rm /bin/bar"
would not remove the file /bin/bar from the log of foo-1.0. nope. not happening. π
to avoid such behaviour it is sometimes useful to join up composed install commands into one single command and run porg once. for instance, imagine that a package installs the file /bin/bar, but we want it to be installed in /usr/bin/bar instead. if one runs this:
porg -lp foo-1.0 make install
porg -lp+ foo-1.0 "mv /bin/bar /usr/bin/bar"
both files, /bin/bar and /usr/bin/bar, remain in the log. this is usually not the desired behaviour. as a workaround one can join up both commands in one single porg run:
porg -lp foo-1.0 "make install && mv /bin/bar /usr/bin/bar"
in this case only /usr/bin/bar is logged. slay. β¨
to remove the package foo-3.3, keeping the files in /etc and the files ending with ".conf":
porg -r -e '/etc:*.conf' foo-3.3
you have installed the package 'boo-1.9' in prefix '/opt/boo-1.9', but you haven't logged the installation with porg. no problem! just create a log for it thusly:
find /opt/boo-1.9 | porg -lp boo-1.9
by the way, porg internally converts all package names to lower case; 'FooBar' and 'foobar' are the same package. case-insensitive queen. π
π BUGS π
due to LD_PRELOAD limitations, porg can't follow the trace of suid programs.
for the same reason, porg does not work with programs that statically link libc.
so real. so valid. so unfortunately true. π
π§ FILES π§
/etc/porgrcβ configuration file/var/lib/porgβ default log directory
πΈ AUTHOR πΈ
written by David Ricart (http://porg.sourceforge.net)
π«Ά SEE ALSO π«Ά
and that's the whole thing bestie β porg 0.10, dated 17 May 2016 π go log some packages, you absolute legend β¨π
π¦ where this page comes from
- debian bookworm: porg 2:0.10-1.2 Β· GPL-2.0-or-later
- ubuntu jammy: porg 2:0.10-1.2 Β· GPL-2.0-or-later
- ubuntu noble: porg 2:0.10-1.2build2 Β· GPL-2.0-or-later
- Copyright (C) 2015 David Ricart <http://porg.sourceforge.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms