LinuxCommandLibrary

opkg

Manage software packages on embedded Linux systems

TLDR

Install a package

$ opkg install [package]
copy

Remove a package
$ opkg remove [package]
copy

Update the list of available packages
$ opkg update
copy

Upgrade one or more specific package(s)
$ opkg upgrade [package(s)]
copy

Display information for a specific package
$ opkg info [package]
copy

List all the available packages
$ opkg list
copy

Find out which package owns a file
$ opkg search [/path/to/file]
copy

List all files belonging to a package
$ opkg files [package]
copy

SYNOPSIS

opkg command [options] [package...]

PARAMETERS

update
    Update the list of available packages from the configured repositories.

upgrade
    Upgrade all installed packages to the latest available versions.

install package...
    Install the specified package(s).

remove package...
    Remove the specified package(s).

list
    List available packages.

list-installed
    List installed packages.

info package...
    Display information about the specified package(s).

files package...
    List the files installed by the specified package(s).

-d destination
    Specify the destination directory for package installation.

--help
    Display help information.

DESCRIPTION

opkg is a lightweight package management system primarily designed for embedded Linux systems, such as those found in routers and other network devices.

It is inspired by dpkg (Debian's package manager) and apt, but has been simplified to reduce its footprint and resource usage. opkg allows users to install, update, and remove software packages (typically in the .ipk format) from remote repositories. It handles dependency resolution, ensuring that required libraries and other packages are installed alongside the target software. Its configuration files define the locations of package repositories, enabling users to easily access and manage a wide range of available software.

While primarily targeted at embedded systems, opkg can also be used on more general-purpose Linux distributions where a minimal package manager is desired.

CAVEATS

opkg is lightweight and may lack some of the advanced features found in larger package managers like apt or yum. Dependency resolution may not always be perfect, and manual intervention may be required in some cases.

CONFIGURATION FILES

opkg relies on configuration files (typically located in /etc/opkg) to define the locations of package repositories. These files specify the URLs where opkg can download package lists and installable packages.

PACKAGE FORMAT

opkg primarily uses the .ipk (Itsy Package) file format for distributing software packages. These files are essentially tar archives containing the package's files and metadata.

HISTORY

opkg was initially developed as part of the OpenWRT project, a popular open-source firmware for embedded devices like routers. It was designed to provide a simple and efficient way to manage software packages on these resource-constrained devices. Over time, opkg has been adopted by other embedded Linux distributions and projects, becoming a widely used package manager in this domain.

SEE ALSO

dpkg(1), apt(8)

Copied to clipboard