opkg Facts¶
Gather the information provided by opkg on OpenWrt systems:
+ opkg configuration
+ feeds configuration
+ list of installed packages
+ list of packages with available upgrades
See https://openwrt.org/docs/guide-user/additional-software/opkg
Note: as of OpenWrt Release 2025.12_, OpenWrt uses apk.
.. _2025.12: https://openwrt.org/releases/25.12/notes-25.12.0#switch_package_manager_from_opkg_to_apk
See also: operations/opkg.
opkg.OpkgConf¶
Returns a NamedTuple with the current configuration:
ConfInfo(
paths = {
"root": "/",
"ram": "/tmp",
},
list_dir = "/opt/opkg-lists",
options = {
"overlay_root": "/overlay"
},
arch_cfg = {
"all": 1,
"noarch": 1,
"i386_pentium": 10
}
)
opkg.OpkgFeeds¶
Returns a dictionary containing the information for the distribution-provided and custom opkg feeds:
{
'openwrt_base': FeedInfo(url='http://downloads ... /i386_pentium/base', fmt='src/gz', kind='distribution'), # noqa: E501
'openwrt_core': FeedInfo(url='http://downloads ... /x86/geode/packages', fmt='src/gz', kind='distribution'), # noqa: E501
'openwrt_luci': FeedInfo(url='http://downloads ... /i386_pentium/luci', fmt='src/gz', kind='distribution'),# noqa: E501
'openwrt_packages': FeedInfo(url='http://downloads ... /i386_pentium/packages', fmt='src/gz', kind='distribution'),# noqa: E501
'openwrt_routing': FeedInfo(url='http://downloads ... /i386_pentium/routing', fmt='src/gz', kind='distribution'),# noqa: E501
'openwrt_telephony': FeedInfo(url='http://downloads ... /i386_pentium/telephony', fmt='src/gz', kind='distribution') # noqa: E501
}
opkg.OpkgInstallableArchitectures¶
Returns a dictionary containing the currently installable architectures for this system along with their priority:
opkg.OpkgPackages¶
Returns a dict of installed opkg packages:
opkg.OpkgUpgradeablePackages¶
Returns a dict of installed and upgradable opkg packages: