LinuxCommandLibrary

installpkg

Install Slackware packages

TLDR

Install a package

$ sudo installpkg [path/to/package.tgz]
copy

Generate a report of a simulated installation to stdout
$ installpkg -warn [path/to/package.tgz]
copy

Create a package from current directory and its subdirectories
$ installpkg -m [package_name.tgz]
copy

Install the contents of the current directory and subdirectories as a package with a specified name
$ sudo installpkg -r [package_name.tgz]
copy

SYNOPSIS

installpkg [options] <package_file> [<package_file> ...]

PARAMETERS

-r <rootpath>
    Install beneath specified alternate root directory

-warn
    Prompt before overwriting existing files

-md5
    Verify package integrity with MD5 checksums

-test
    Test package integrity without installing

-menu
    Interactive menu for selecting from listed packages

-priority <prio>
    Set priority: A, AP, L, N, opt

-nobackup
    Skip automatic backups of replaced files

-infodir <path>
    Use alternate path for package info logs

DESCRIPTION

installpkg is the primary command for installing software packages in Slackware Linux. It processes package files in formats like .txz (xz-compressed tar), .tbz (bzip2), or .tgz (gzip). Upon execution with root privileges, it extracts files to their target paths on the filesystem, sets correct ownership and permissions, and handles symlinks.

The command automatically verifies package integrity via MD5 checksums if a install/doinst.sh or checksum file is present. It logs installation details—including name, version, build, and size—to /var/log/packages/, enabling queries with tools like pkgtool. Existing files are overwritten silently unless -warn is specified.

Key for system maintenance, it supports bulk installs by listing multiple packages. Options facilitate testing (-test), alternate roots (-r for chroots), and priority tagging for organized setups (A, AP, L, N, opt). Unlike high-level managers (e.g., apt), it's low-level, direct, and distro-specific, emphasizing simplicity and control in Slackware's philosophy.

CAVEATS

Slackware-specific; requires root. Overwrites files silently by default. Supports only Slackware formats (.txz/.tbz/.tgz). No dependency resolution—handle manually.

DEFAULT BEHAVIOR

Auto-checks MD5 if available; logs to /var/log/packages/; installs to /.

EXAMPLE USAGE

installpkg foo.txz
installpkg -r /mnt foo.txz
installpkg -warn -test *.txz

HISTORY

Created by Patrick J. Volkerding for Slackware ~1993. Evolved with formats: .tgz (early), .tbz (Slackware 12), .txz (13.0, 2009) using LZMA/xz for efficiency. Remains core tool, minimally changed for reliability.

SEE ALSO

Copied to clipboard