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 ...]
`installpkg` [options] --checkonly package_file [package_file ...]
`installpkg` [options] --remove package_name [package_name ...]

PARAMETERS

--root <path>
    Specify an alternate installation root directory.

--upgrade
    Force an upgrade of an already installed package.

--keep
    When upgrading, keep existing configuration files (do not install new ones).

--warn
    Warn if a package is already installed but do not upgrade it.

--checkonly
    Do not install or remove; only check package integrity.

--remove
    Remove the specified package(s) instead of installing.

--md5sum
    Verify MD5 checksums of files during installation (if available in the package).

--info
    Display detailed package information without installing or removing.

--skip-scripts
    Do not execute package installation scripts (e.g., install.sh, doinst.sh).

--preserve
    Preserve permissions and ownership of files inside the package during installation.

DESCRIPTION

`installpkg` is a fundamental command in Slackware Linux, designed for the installation, upgrading, and removal of software packages. Unlike package managers in other distributions, `installpkg` operates on individual package files (typically .tgz, .txz, .tbz, .tlz, .tzo formats) and does not automatically resolve dependencies. This aligns with Slackware's philosophy of simplicity and user control.

When installing, it unpacks the package contents into the filesystem, places setup scripts, and updates the package database. For upgrades, it intelligently handles configuration files, often moving existing ones to .orig or .new extensions to prevent accidental overwrites. It can also be used to remove installed packages. `installpkg` provides a straightforward, script-driven approach to maintaining a Slackware system, empowering users with explicit control over their installed software.

CAVEATS

`installpkg` does not perform automatic dependency resolution. Users are responsible for ensuring all necessary dependencies are met before installing a package.
It requires superuser (root) privileges to install or remove packages in the system's root directory.
This command is specific to Slackware Linux and its derivatives; it will not work on other distributions like Debian, Red Hat, or Arch Linux systems.

<I>PACKAGE NAMING CONVENTION</I>

Slackware packages follow a strict naming convention: name-version-architecture-build.pkg.extension. For example, `firefox-125.0.2-x86_64-1.txz`. Understanding this format is crucial for identifying and managing packages.

<I>CONFIGURATION FILE HANDLING DURING UPGRADES</I>

During an upgrade, if a file in the new package would overwrite an existing modified configuration file, `installpkg` typically moves the old file to a .orig or .new extension (e.g., `myconfig.conf` becomes `myconfig.conf.orig`), allowing the new version to be installed. Users are then expected to manually merge changes if desired.

HISTORY

The `installpkg` command has been a core component of the Slackware Linux package management system since its inception in the early 1990s. Its design reflects Slackware's long-standing philosophy of simplicity, transparency, and user control. Unlike more complex, dependency-resolving package managers that emerged later, `installpkg` remains a straightforward script, allowing users to understand and manage their system's software directly without hidden abstractions. This stability in design has been a hallmark of Slackware's development, focusing on robust, script-based tools.

SEE ALSO

removepkg(8), upgradepkg(8), pkgtool(8), makepkg(8), explodepkg(8)

Copied to clipboard