opkg
packageEmbedded Linux
The opkg command is one of the most frequently used commands in Linux/Unix-like operating systems. opkg Lightweight package management system for embedded Linux devices
Quick Reference
Command Name:
opkg
Category:
package
Platform:
Embedded Linux
Basic Usage:
opkg [options] [arguments]
Common Use Cases
Syntax
opkg [options] sub-command [arguments]
Options
Option | Description |
---|---|
-A |
Allow package downgrade |
-f, --force-depends |
Install/remove despite failed dependencies |
--force-maintainer |
Overwrite local configuration files with those from the packages |
--force-reinstall |
Reinstall packages that are already installed |
--force-overwrite |
Overwrite files from other packages |
--force-downgrade |
Allow package downgrade |
--force-space |
Install even with insufficient disk space |
--force-removal-of-dependent-packages |
Remove packages that depend on the package being removed |
--autoremove |
Remove packages that were installed automatically to satisfy dependencies |
--offline-root PATH |
Use PATH as the root directory for offline installation |
-t, --tmp-dir PATH |
Use PATH for temporary files |
-d, --dest NAME |
Use NAME as the destination name |
-v, --verbose |
Enable verbose output |
-V, --verbosity=LEVEL |
Set verbosity level to LEVEL |
-h, --help |
Display help information |
Common Subcommands:
Subcommand | Description |
---|---|
update | Update list of available packages |
upgrade | Upgrade installed packages |
install <pkg> | Install package(s) |
remove <pkg> | Remove package(s) |
configure | Configure unpacked packages |
list | List available packages |
list-installed | List installed packages |
list-upgradable | List installed packages that can be upgraded |
info <pkg> | Display information about package(s) |
status <pkg> | Display status of package(s) |
download <pkg> | Download package(s) |
compare-versions <v1> <op> <v2> | Compare version strings (operators: <=, >=, =, <<, >>) |
print-architecture | Display target architecture |
search <pattern> | Search for packages matching a pattern |
files <pkg> | List files owned by package(s) |
find <file> | Find package owning file |
Examples
How to Use These Examples
The examples below show common ways to use the opkg
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
opkg update