---
name: "dnf5daemon-dbus-api"
section: "8"
platform: "linux"
package: "dnf5"
version: "5.4.6.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dnf5daemon-dbus-api"
---

# dnf5daemon-dbus-api(8)

DBus API Reference for Dnf5daemon

## NAME

dnf5daemon-dbus-api - DBus API Reference for Dnf5daemon

## SYNOPSIS

D-Bus methods and arguments. Generated from D-Bus XMLs.

## DESCRIPTION

Note: While most of the following methods can be invoked successfully by a regular user, authentication by an administrative user is required for some of them (e.g. *Goal.do\_transaction()*, *Repo.confirm\_key()*, *Repo.enable()*, *Repo.disable()*). This authentication is managed by calling *CheckAuthorization()* method of the *org.freedesktop.PolicyKit1.Authority* Polkit D-Bus interface. The *AllowUserInteraction* flag is set for this call, indicating that if an authentication agent is available, the call is blocked while the user is prompted to authenticate. A hardcoded timeout of 2 minutes is set for the user interaction.

## INTERFACES

### org.rpm.dnf.v0.SessionManager interface

- **interface org.rpm.dnf.v0.SessionManager**

  - **method open\_session(a{sv} options) -\> (o session\_object\_path)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- session configuration - an array of key/value pairs

    - **Returns**

      - •

        **session\_object\_path** (*o*) -- object path to created Session object

    Opens a new session.

    Following configuration options are supported:

    - •

      - **load\_system\_repo: bool, default true**

        If true information about currently installed packages is loaded.

    - •

      - **load\_available\_repos: bool, default true**

        If true information about packages available in enabled repositories is loaded.

    - •

      - **config: map {string: string}**

        Override configuration options.

    - •

      - **releasever: string**

        Override releasever variable used for substitutions in repository configurations.

    - •

      - **locale: string**

        Override server locale for this session. Affects language used in various error messages.

    Unknown options are ignored.

  - **method close\_session(o session\_object\_path) -\> (b success)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of session to close

    - **Returns**

      - •

        **success** (*b*) -- bool whether the requested session was successfully closed

    Close session on given object path.

### org.rpm.dnf.v0.Base interface

- **interface org.rpm.dnf.v0.Base**

  - **method read\_all\_repos() -\> (b success)**

    - **Returns**

      - •

        **success** (*b*) -- *true* if repositories were successfully loaded, *false* otherwise.

    Explicitly ask for loading repositories metadata.

  - **method clean\_with\_options(s cache\_type, a{sv} options) -\> (b success, s error\_msg)**

    - **Arguments**

      - •

        **cache\_type** (*s*) -- cache type to clean up. Supported types are "all", "packages", "metadata", "dbcache", and "expire-cache".

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify the call behavior

    - **Returns**

      - •

        **success** (*b*) -- *true* if the cache was successfully cleaned, *false* otherwise.

      - •

        **error\_msg** (*s*) -- string, contains errors encountered while cleaning the cache.

    Remove or expire cached data.

    - **Following @options are supported:**

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method clean(s cache\_type) -\> (b success, s error\_msg)**

    - **Arguments**

      - •

        **cache\_type** (*s*) -- cache type to clean up. Supported types are "all", "packages", "metadata", "dbcache", and "expire-cache".

    - **Returns**

      - •

        **success** (*b*) -- *true* if the cache was successfully cleaned, *false* otherwise.

      - •

        **error\_msg** (*s*) -- string, contains errors encountered while cleaning the cache.

    Remove or expire cached data.

    This is equivalent to call "clean\_with\_options()" with empty options.

  - **method reset() -\> (b success, s error\_msg)**

    - **Returns**

      - •

        **success** (*b*) -- *true* if the session was successfully reset, *false* otherwise.

      - •

        **error\_msg** (*s*) -- string, contains errors encountered while resetting the session

    Completely reset the session.

  - **signal download\_add\_new(o session\_object\_path, s download\_id, s description, x total\_to\_download)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **download\_id** (*s*) -- unique id of downloaded object (repo or package)

      - •

        **description** (*s*) -- the description of the downloaded object

      - •

        **total\_to\_download** (*x*) -- total bytes to download

    A new download has started.

  - **signal download\_progress(o session\_object\_path, s download\_id, x total\_to\_download, x downloaded)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **download\_id** (*s*) -- unique id of downloaded object (repo or package)

      - •

        **total\_to\_download** (*x*) -- total bytes to download

      - •

        **downloaded** (*x*) -- bytes already downloaded

    Progress in downloading.

  - **signal download\_mirror\_failure(o session\_object\_path, s download\_id, s message, s url, s metadata)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **download\_id** (*s*) -- unique id of downloaded object (repo or package)

      - •

        **message** (*s*) -- an error message

      - •

        **url** (*s*) -- URL being downloaded

      - •

        **metadata** (*s*) -- For repository metadata download contains metadata type

    Mirror failure during the download.

  - **signal download\_end(o session\_object\_path, s download\_id, u transfer\_status, s message)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **download\_id** (*s*) -- unique id of downloaded object (repo or package)

      - •

        **transfer\_status** (*u*) -- libdnf5::repo::DownloadCallbacks::TransferStatus (0 - successful, 1 - already exists, 2 - error)

      - •

        **message** (*s*) -- error message in case of failed download

    Downloading has ended.

  - **signal repo\_key\_import\_request(o session\_object\_path, s key\_id, as user\_ids, s key\_fingerprint, s key\_url, x timestamp)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **key\_id** (*s*) -- OpenPGP key id

      - •

        **user\_ids** (*as*) -- User id

      - •

        **key\_fingerprint** (*s*) -- Fingerprint of the OpenPGP key

      - •

        **key\_url** (*s*) -- URL of the OpenPGP key

      - •

        **timestamp** (*x*) -- timestamp when the key was created

    Request for repository key import confirmation.

  - **signal repo\_key\_imported(o session\_object\_path, s key\_id, as user\_ids, s key\_fingerprint, s key\_url, x timestamp)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **key\_id** (*s*) -- OpenPGP key id

      - •

        **user\_ids** (*as*) -- User id

      - •

        **key\_fingerprint** (*s*) -- Fingerprint of the OpenPGP key

      - •

        **key\_url** (*s*) -- URL of the OpenPGP key

      - •

        **timestamp** (*x*) -- timestamp when the key was created

    Informational signal emitted after a repository key was successfully imported.

### org.rpm.dnf.v0.rpm.Repo interface

- **interface org.rpm.dnf.v0.rpm.Repo**

  - **method list(a{sv} options) -\> (aa{sv} repositories)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs

    - **Returns**

      - •

        **repositories** (*aa{sv}*) -- array of returned repositories with requested attributes

    Get list of repositories that match to given filters.

    Following options are supported:

    - •

      - **patterns: list of strings**

        any repository with id matching to any of patterns is returned

    - •

      - **repo\_attrs: list of strings**

        list of repository attributes that are returned

    - •

      - **enable\_disable: string (default "enabled")**

        When set to "enabled" or "disabled", only enabled / disabled repositories are listed. Any other value means all repositories are returned.

    - •

      - **interactive: boolean, default false**

        Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method confirm\_key\_with\_options(s key\_id, b confirmed, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **key\_id** (*s*) -- id of the key in question

      - •

        **confirmed** (*b*) -- whether the key import is confirmed by user

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify the call behavior

    Confirm repository OpenPGP key import.

    - **Following @options are supported:**

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method confirm\_key(s key\_id, b confirmed) -\> ()**

    - **Arguments**

      - •

        **key\_id** (*s*) -- id of the key in question

      - •

        **confirmed** (*b*) -- whether the key import is confirmed by user

    Confirm repository OpenPGP key import.

    This is equivalent to call "confirm\_key\_with\_options()" with empty options.

  - **method enable\_with\_options(as repo\_ids, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **repo\_ids** (*as*) -- array of strings containing all repo ids to be enabled

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify the call behavior

    Enable repositories based on the list of given ids.

    - **Following @options are supported:**

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method enable(as repo\_ids) -\> ()**

    - **Arguments**

      - •

        **repo\_ids** (*as*) -- array of strings containing all repo ids to be enabled

    Enable repositories based on the list of given ids.

    This is equivalent to call "enable\_with\_options()" with empty options.

  - **method disable\_with\_options(as repo\_ids, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **repo\_ids** (*as*) -- array of strings containing all repo ids to be disabled

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify the call behavior

    Disable repositories based on the list of given ids.

    - **Following @options are supported:**

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method disable(as repo\_ids) -\> ()**

    - **Arguments**

      - •

        **repo\_ids** (*as*) -- array of strings containing all repo ids to be disabled

    Disable repositories based on the list of given ids.

    This is equivalent to call "disable\_with\_options()" with empty options.

### org.rpm.dnf.v0.rpm.Rpm interface

- **interface org.rpm.dnf.v0.rpm.Rpm**

  - **method list(a{sv} options) -\> (aa{sv} packages)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs

    - **Returns**

      - •

        **packages** (*aa{sv}*) -- array of returned packages with requested attributes

    Get list of packages that match to given filters. Since the method returns packages directly in the D-Bus method reply message, which has a limited size, there is a possibility that the requested package set size would exceed this limit. If you request a large number of packages and/or a great number of package attributes, please consider using the list\_fd() method.

    Following options and filters are supported:

    - •

      - **package\_attrs: list of strings**

        list of package attributes that are returned. Supported attributes are name, epoch, version, release, arch, repo\_id, from\_repo\_id, is\_installed, install\_size, download\_size, buildtime, install\_time, sourcerpm, summary, url, license, description, files, changelogs, provides, requires, requires\_pre, conflicts, obsoletes, recommends, suggests, enhances, supplements, evr, nevra, full\_nevra, reason, vendor, group.

    - •

      - **with\_nevra: bool (default true)**

        match patterns against available packages NEVRAs

    - •

      - **with\_provides: bool (default true)**

        match patterns against available packages provides

    - •

      - **with\_filenames: bool (default true)**

        match patterns against names of the files in available packages

    - •

      - **with\_binaries: bool (default true)**

        match patterns against names of the binaries in */usr/(s)bin* in available packages

    - •

      - **with\_src: bool (default true)**

        include source rpms into the results

    - •

      - **icase: bool (default true)**

        ignore case while matching patterns

    - •

      - **interactive: boolean, default false**

        Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    - •

      - **patterns: list of strings**

        any package matching to any of patterns is returned

    - •

      - **scope: string (default "all")**

        limit packages to one of "all", "installed", "available", "upgrades", "upgradable"

    - •

      - **arch: list of strings**

        limit the resulting set only to packages of given architectures

    - •

      - **repo: list of strings**

        limit the resulting set only to packages from given repositories

    - •

      - **latest-limit: int**

        limit the resulting set to only \<limit\> of latest packages for every name and architecture

    - •

      - **whatprovides: list of strings**

        limit the resulting set only to packages that provide any of given capabilities

    - •

      - **whatdepends: list of strings**

        limit the resulting set only to packages that require, enhance, recommend, suggest or supplement any of given capabilities

    - •

      - **whatrequires: list of strings**

        limit the resulting set only to packages that require any of given capabilities

    - •

      - **whatrecommends: list of strings**

        limit the resulting set only to packages that recommend any of given capabilities

    - •

      - **whatenhances: list of strings**

        limit the resulting set only to packages that enhance any of given capabilities

    - •

      - **whatsuggests: list of strings**

        limit the resulting set only to packages that suggest any of given capabilities

    - •

      - **whatsupplements: list of strings**

        limit the resulting set only to packages that supplement any of given capabilities

    - •

      - **whatobsoletes: list of strings**

        limit the resulting set only to packages that obsolete any of given capabilities

    - •

      - **whatconflicts: list of strings**

        limit the resulting set only to packages that conflict with any of given capabilities

    Unknown options are ignored.

  - **method list\_fd(a{sv} options, h file\_descriptor) -\> (s transfer\_id)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs

      - •

        **file\_descriptor** (*h*) -- File descriptor opened for writing used to transfer data

    - **Returns**

      - •

        **transfer\_id** (*s*) -- Identifier of this transfer. Used for signaling the end of transfer.

    Retrieve a list of packages that match the provided filters. Packages are transmitted as a stream of JSON objects, with each JSON object representing one package as a dictionary. This stream is then written into the given file\_descriptor. Unlike the list() method, this approach does not encounter issues with large output data. The server has a 30-second timeout during which it waits for the client to read data from the pipe if the pipe is full.

    The same options as in list() method are supported.

  - **method install(as pkg\_specs, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **pkg\_specs** (*as*) -- an array of package specifications to be installed on the system

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify install behavior

    Mark packages specified by @pkg\_specs for installation.

    Following @options are supported:

    - •

      - **repo\_ids: list of strings**

        Identifiers of the repos from which the packages could be installed.

    - •

      - **skip\_broken: boolean, default false**

        Whether solver can skip packages with broken dependencies to resolve transaction

    - •

      - **skip\_unavailable: boolean, default false**

        Whether nonexisting packages can be skipped.

    Unknown options are ignored.

  - **method upgrade(as pkg\_specs, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **pkg\_specs** (*as*) -- an array of package specifications to be upgraded on the system

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify upgrade behavior

    Mark packages specified by @pkg\_specs for upgrade.

    Following @options are supported:

    - •

      - **repo\_ids: list of strings**

        Identifiers of the repos from which the packages could be upgraded.

    Unknown options are ignored.

  - **method remove(as pkg\_specs, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **pkg\_specs** (*as*) -- an array of package specifications to be removed on the system

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify remove behavior

    Mark packages specified by @pkg\_specs for removal.

    Unknown options are ignored.

  - **method distro\_sync(as pkg\_specs, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **pkg\_specs** (*as*) -- array of package specifications to synchronize to the latest available versions

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify distro\_sync behavior

    Following @options are supported:

    Unknown options are ignored.

  - **method downgrade(as pkg\_specs, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **pkg\_specs** (*as*) -- an array of package specifications to be downgraded on the system

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify downgrade behavior

    Mark packages specified by @pkg\_specs for downgrade.

    Following @options are supported:

    Unknown options are ignored.

  - **method reinstall(as pkg\_specs, a{sv} options) -\> ()**

    - **Arguments**

      - •

        **pkg\_specs** (*as*) -- an array of package specifications to be reinstalled on the system

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify reinstall behavior

    Mark packages specified by @pkg\_specs for reinstall.

    Following @options are supported:

    Unknown options are ignored.

  - **method system\_upgrade(a{sv} options) -\> ()**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify system\_upgrade behavior

    Prepare a transaction for upgrade to the new distribution release. The prepared transaction should be executed during reboot (see *offline* option of the *do\_transaction* method of the *Goal* interface). The method relies on the *releasever* option being correctly set to the new distribution release during the *open\_session()* call.

    Following @options are supported:

    - •

      - **mode: string (one of "distrosync", "upgrade", default is "distrosync")**

        By default the system\_upgrade behaves like *dnf distro-sync*, always installing packages from the new release, even if they are older than the currently installed version. If set to "upgrade", packages from the new release are not installed if they are older than what is currently installed (behave like *dnf upgrade*).

    - •

      - **interactive: boolean, default true**

        Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **signal transaction\_elem\_progress(o session\_object\_path, s nevra, t processed, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **nevra** (*s*) -- full NEVRA of the package

      - •

        **processed** (*t*) -- amount already processed

      - •

        **total** (*t*) -- total to process

    Overall progress in transaction item processing. Called right before an item is processed.

  - **signal transaction\_before\_begin(o session\_object\_path, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **total** (*t*) -- number of elements in the rpm transaction

    Send right before the rpm transaction is run.

  - **signal transaction\_after\_complete(o session\_object\_path, b success)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **success** (*b*) -- true if the rpm transaction was completed successfully

    Send right after the rpm transaction run finished.

  - **signal transaction\_action\_start(o session\_object\_path, s nevra, u action, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **nevra** (*s*) -- full NEVRA of the package

      - •

        **action** (*u*) -- one of the dnfdaemon::RpmTransactionItem::Actions enum

      - •

        **total** (*t*) -- the disk space used/freed by the package after the action finishes

    Processing (installation or removal) of the package has started.

  - **signal transaction\_action\_progress(o session\_object\_path, s nevra, t processed, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **nevra** (*s*) -- full NEVRA of the package

      - •

        **processed** (*t*) -- the portion of the package already installed/removed

      - •

        **total** (*t*) -- the disk space used/freed by the package after the action finishes

    Progress in processing of the package. Note that there is a hardcoded limit that prevents sending more than one signal every 400 milliseconds to avoid overwhelming the user or D-Bus with excessive signals. For smaller packages there might be no progress signals or only the starting progress signal with @processed equal to 0.

  - **signal transaction\_action\_stop(o session\_object\_path, s nevra, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **nevra** (*s*) -- full NEVRA of the package

      - •

        **total** (*t*) -- the disk space used/freed by the package after the action finishes

    Processing of the package has finished.

  - **signal transaction\_script\_start(o session\_object\_path, s nevra, u scriptlet\_type)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **nevra** (*s*) -- full NEVRA of the package script belongs to

      - •

        **scriptlet\_type** (*u*) -- scriptlet type that started (pre, post,...)

    The scriptlet has started.

  - **signal transaction\_script\_stop(o session\_object\_path, s nevra, u scriptlet\_type, t return\_code)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **nevra** (*s*) -- full NEVRA of the package script belongs to

      - •

        **scriptlet\_type** (*u*) -- scriptlet type that started (pre, post,...)

      - •

        **return\_code** (*t*) -- return value of the script

    The scriptlet has successfully finished.

  - **signal transaction\_script\_error(o session\_object\_path, s nevra, u scriptlet\_type, t return\_code)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **nevra** (*s*) -- full NEVRA of the package script belongs to

      - •

        **scriptlet\_type** (*u*) -- scriptlet type that started (pre, post,...)

      - •

        **return\_code** (*t*) -- return value of the script

    The scriptlet has finished with an error.

  - **signal transaction\_verify\_start(o session\_object\_path, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **total** (*t*) -- total to process

    Package files verification has started.

  - **signal transaction\_verify\_progress(o session\_object\_path, t processed, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **processed** (*t*) -- amount already processed

      - •

        **total** (*t*) -- total to process

    Progress in processing of the package.

  - **signal transaction\_verify\_stop(o session\_object\_path, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **total** (*t*) -- total to process

    Package files verification has finished.

  - **signal transaction\_transaction\_start(o session\_object\_path, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **total** (*t*) -- total to process

    Preparation of transaction packages has started.

  - **signal transaction\_transaction\_progress(o session\_object\_path, t processed, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **processed** (*t*) -- amount already processed

      - •

        **total** (*t*) -- total to process

    Progress in preparation of transaction packages.

  - **signal transaction\_transaction\_stop(o session\_object\_path, t total)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **total** (*t*) -- total to process

    Preparation of transaction packages has finished.

  - **signal transaction\_unpack\_error(o session\_object\_path, s nevra)**

    - **Arguments**

      - •

        **session\_object\_path** (*o*) -- object path of the dnf5daemon session

      - •

        **nevra** (*s*) -- full NEVRA of the package

    Error while unpacking the package.

  - **signal write\_to\_fd\_finished(b success, s transfer\_id, s error\_msg)**

    - **Arguments**

      - •

        **success** (*b*) -- true if the transfer finished successfully

      - •

        **transfer\_id** (*s*) -- id of the finished transfer

      - •

        **error\_msg** (*s*) -- error message if the transfer was not successful.

    Notify the user that writing to the file descriptor with given transfer\_id has finished and the descriptor has been closed.

### org.rpm.dnf.v0.Goal interface

- **interface org.rpm.dnf.v0.Goal**

  - **method resolve(a{sv} options) -\> (a(sssa{sv}a{sv}) transaction\_items, u result)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify dependency resolving

    - **Returns**

      - •

        **transaction\_items** (*a(sssa{sv}a{sv})*) -- array of (object\_type, action, reason, {transaction\_item\_attributes}, {object}) tuples. object\_type is one of libdnf5::transaction::TransactionItemType, action is one of libdnf5::transaction::TransactionItemAction, reason is one of libdnf5::transaction::TransactionItemReason enums. Each of these enums are represented as strings using corresponding libdnf5::transaction::\*\_to\_string() methods. transaction\_item\_attributes is a map {attribute: value}. Currently "reason\_change\_group\_id" attribute is used for target group id in case the action is ReasonChange and the reason Group, and "replaces" containing a vector of packages ids being replaced by this item. Finally the object is a map {attribute: value} and represents (according to object\_type) package, group, environment, or module. These package attributes are returned: "name", "epoch", "version", "release", "arch", "repo\_id", "from\_repo\_id", "package\_size", "install\_size", "evr", and "reason". For groups the object contains "groupid" and "name" attributes.

      - •

        **result** (*u*) -- problems detected during transaction resolving. Possible values are 0 - no problem, 1 - no problem, but some info / warnings are present or 2 - resolving failed.

    Resolve the transaction.

    - **Following @options are supported:**

      - •

        - **allow\_erasing: boolean, default false**

          Whether removal of installed package is allowed to resolve the transaction.

      - •

        - **interactive: boolean, default false**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method get\_transaction\_problems\_string() -\> (as problems)**

    - **Returns**

      - •

        **problems** (*as*) -- array of strings containing all problems found during the transaction resolution.

    Return all problems found during the transaction resolution as human readable messages.

  - **method get\_transaction\_problems() -\> (aa{sv} problems)**

    - **Returns**

      - •

        **problems** (*aa{sv}*) -- array of {key: value} maps

    Return all problems found during the transaction resolution as structures. This is the list of problem keys: always present: action - see include/libdnf5/base/goal\_elements.hpp: GoalAction problem - see include/libdnf5/base/goal\_elements.hpp: GoalProblem optional: goal\_job\_settings - {string: variant}, settings used to resolve the goal spec - string, usually nevra of affected package additional\_data - array of strings, more details on the problem solver\_problems - problems reported by underlying libsolv

  - **method do\_transaction(a{sv} options) -\> ()**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify transaction running

    Perform the resolved transaction.

    - **Following @options are supported:**

      - •

        - **comment: string**

          Adds a comment to a transaction.

      - •

        - **offline: boolean, default false**

          If true, the transaction will be prepared to run during the next reboot. Otherwise, it will run immediately.

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

      - •

        - **downloadonly: boolean, default false, since 5.2.16**

          If true, only download the resolved package set without executing an RMP transaction. Along with the offline option, the offline transaction files are prepared, but the execution of the transaction is not initiated.

    Unknown options are ignored.

  - **method cancel() -\> (b success, s error\_msg)**

    - **Returns**

      - •

        **success** (*b*) -- true if the cancellation was successfully requested

      - •

        **error\_msg** (*s*) -- error message if the cancellation was refused

    Cancel the transaction that was initiated by *do\_transaction()*. The transaction can only be canceled during the package download phase. Once the RPM transaction has begun, cancellation is no longer permitted.

  - **method reset() -\> ()**

    Reset the prepared rpm transaction. After this call the session is ready to perform another rpm transaction.

### org.rpm.dnf.v0.Offline interface

- **interface org.rpm.dnf.v0.Offline**

  - **method get\_status() -\> (b pending, a{sv} transaction\_status)**

    - **Returns**

      - •

        **pending** (*b*) -- boolean, true if there is a pending offline transaction

      - •

        **transaction\_status** (*a{sv}*) -- the status of the current offline dnf5 transaction

    Check whether there is an offline transaction configured for the next reboot initiated by dnf5 and return its status.

  - **method cancel\_with\_options(a{sv} options) -\> (b success, s error\_msg)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify the call behavior

    - **Returns**

      - •

        **success** (*b*) -- boolean, returns *false* if there was an error during the transaction cancellation, or if the offline transaction was initiated by another tool than dnf5. Returns *true* if the offline transaction was successfully cancelled or if no offline transaction was configured.

      - •

        **error\_msg** (*s*) -- string, contains error encountered while cancelling the transaction

    Cancel the dnf5 offline transaction configured for the next reboot. Offline updates scheduled by another tool are not cancelled.

    - **Following @options are supported:**

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method cancel() -\> (b success, s error\_msg)**

    - **Returns**

      - •

        **success** (*b*) -- boolean, returns *false* if there was an error during the transaction cancellation, or if the offline transaction was initiated by another tool than dnf5. Returns *true* if the offline transaction was successfully cancelled or if no offline transaction was configured.

      - •

        **error\_msg** (*s*) -- string, contains error encountered while cancelling the transaction

    Cancel the dnf5 offline transaction configured for the next reboot. Offline updates scheduled by another tool are not cancelled.

    This is equivalent to call "cancel\_with\_options()" with empty options.

  - **method clean\_with\_options() -\> (b success, s error\_msg)**

    - **Returns**

      - •

        **success** (*b*) -- boolean, returns *false* if there was an error during the transaction cleanup. Returns *true* if the offline transaction was successfully cleaned or if no offline transaction was configured.

      - •

        **error\_msg** (*s*) -- string, contains error encountered while cleaning the transaction

    Cancel the dnf5 offline transaction configured for the next reboot and remove all stored offline transaction data, including downloaded packages. Offline updates scheduled by another tool are not affected.

    - **Following @options are supported:**

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method clean(a{sv} options) -\> (b success, s error\_msg)**

    - **Arguments**

      - •

        **options** (*a{sv}*)

    - **Returns**

      - •

        **success** (*b*) -- boolean, returns *false* if there was an error during the transaction cleanup. Returns *true* if the offline transaction was successfully cleaned or if no offline transaction was configured.

      - •

        **error\_msg** (*s*) -- string, contains error encountered while cleaning the transaction

    Cancel the dnf5 offline transaction configured for the next reboot and remove all stored offline transaction data, including downloaded packages. Offline updates scheduled by another tool are not affected.

    This is equivalent to call "clean\_with\_options()" with empty options.

  - **method set\_finish\_action\_with\_options(s action, a{sv} options) -\> (b success, s error\_msg)**

    - **Arguments**

      - •

        **action** (*s*) -- string, one of "poweroff", or "reboot". If set to "poweroff", the system will be powered off after applying the offline transaction. Otherwise the system will reboot.

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify the call behavior

    - **Returns**

      - •

        **success** (*b*) -- boolean, true if the action was successfully set

      - •

        **error\_msg** (*s*) -- string, contains error encountered while setting the action

    Set the action that should be performed after the offline transaction is applied. If the *action* is "poweroff", the system will be powered off, otherwise it will be rebooted (which is default). The call might fail in case there is no scheduled offline transaction, or the transaction was not scheduled using libdnf5.

    - **Following @options are supported:**

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method set\_finish\_action(s action) -\> (b success, s error\_msg)**

    - **Arguments**

      - •

        **action** (*s*) -- string, one of "poweroff", or "reboot". If set to "poweroff", the system will be powered off after applying the offline transaction. Otherwise the system will reboot.

    - **Returns**

      - •

        **success** (*b*) -- boolean, true if the action was successfully set

      - •

        **error\_msg** (*s*) -- string, contains error encountered while setting the action

    Set the action that should be performed after the offline transaction is applied. If the *action* is "poweroff", the system will be powered off, otherwise it will be rebooted (which is default). The call might fail in case there is no scheduled offline transaction, or the transaction was not scheduled using libdnf5.

    This is equivalent to call "set\_finish\_action\_with\_options()" with empty options.

  - **method schedule\_for\_next\_boot(a{sv} options) -\> (b success, s error\_msg)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs to modify the call behavior

    - **Returns**

      - •

        **success** (*b*) -- boolean, true if the offline transaction was successfully scheduled for the next boot

      - •

        **error\_msg** (*s*) -- string, contains error encountered while scheduling the transaction

    Schedule the prepared offline transaction for the next boot. This creates the magic symlink /system-update and sets the transaction status to "ready". The system will not be rebooted; the caller is responsible for initiating the reboot when appropriate.

    The call might fail if there is no offline transaction in the "download-complete" or "ready" state, or the transaction was not prepared using libdnf5.

    - **Following @options are supported:**

      - •

        - **interactive: boolean, default true**

          Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

### org.rpm.dnf.v0.comps.Group interface

- **interface org.rpm.dnf.v0.comps.Group**

  - **method list(a{sv} options) -\> (aa{sv} groups)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs

    - **Returns**

      - •

        **groups** (*aa{sv}*) -- array of returned groups with requested attributes

    Get list of groups that match to given filters.

    Following options and filters are supported:

    - •

      - **attributes: list of strings**

        list of group attributes that are returned

    - •

      - **match\_group\_id: bool (default true)**

        match patterns against ids of the groups

    - •

      - **match\_group\_name: bool (default false)**

        match patterns against names of the groups

    - •

      - **scope: string (default "all")**

        limit groups to one of "all", "installed", "available"

    - •

      - **with\_hidden: bool (default false)**

        include hidden groups into the result

    - •

      - **patterns: list of strings**

        any group matching to any of patterns is returned

    - •

      - **contains\_pkgs: list of strings**

        include only groups containing given packages

    - •

      - **lang: string (default current locale)**

        language code for translated\_name and translated\_description attributes

    - •

      - **interactive: boolean, default false**

        Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

### org.rpm.dnf.v0.Advisory interface

- **interface org.rpm.dnf.v0.Advisory**

  - **method list(a{sv} options) -\> (aa{sv} advisories)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs

    - **Returns**

      - •

        **advisories** (*aa{sv}*) -- array of returned advisories with requested attributes

    Get list of security advisories that match to given filters.

    Following options and filters are supported:

    - •

      - **advisory\_attrs: list of strings**

        List of advisory attributes that are returned in *advisories* array. Supported attributes are "advisoryid", "name", "title", "type", "severity", "status", "vendor", "description", "buildtime", "message", "rights", "collections", and "references".

    - •

      - **availability: string, default "available"**

        Limit returned advisories based on their relation to installed packages. Accepted values are

        - •

          "available" to return only advisories containing newer versions of installed packages

        - •

          "all" - to return all advisories

        - •

          "installed" - to return only advisories containing equal or older versions of installed packages

        - •

          "updates" - to return only advisories containing newer versions of installed packages for which an update is available

    - •

      - **names: list of strings**

        Consider only advisories with one of the given advisory identifiers. Values must be exact advisory IDs (e.g., "FEDORA-2025-beb4c9a336" or "RHSA-2024:1234"). Globs/wildcards and package names are not accepted in this option.

    - •

      - **types: list of strings**

        Consider only advisories of given types. Possible types are "security", "bugfix", "enhancement", and "newpackage".

    - •

      - **contains\_pkgs: list of strings**

        Consider only advisories containing packages with names matching one of given glob patterns. Matching is performed against package base names (for example "kernel", "bash", "buildah"). NEVRA strings or name.arch forms are not supported.

    - •

      - **severities: list of strings**

        Consider only advisories of given severity. Possible values are "critical", "important", "moderate", "low", and "none".

    - •

      - **reference\_bzs: list of strings**

        Consider only advisories referencing given Bugzilla ticket ID. Expected values are numeric IDs, e.g. 123456.

    - •

      - **reference\_cves: list of strings**

        Consider only advisories referencing given CVE ID. Expected values are strings IDs in CVE format, e.g. CVE-2201-0123.

    - •

      - **with\_bz: boolean, default False**

        Consider only advisories referencing a Bugzilla ticket.

    - •

      - **with\_cve: boolean, default False**

        Consider only advisories referencing a CVE ticket.

    - •

      - **interactive: boolean, default false**

        Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

### org.rpm.dnf.v0.History interface

- **interface org.rpm.dnf.v0.History**

  - **method recent\_changes(a{sv} options) -\> (a{saa{sv}} changeset)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs

    - **Returns**

      - •

        **changeset** (*a{saa{sv}}*) -- a dictionary {"\<type\_of\_change\>":\[\<package\>,\<package\>,...\]}

    Get a list of packages that have been recently changed. The result represents the difference between the currently installed package set and the set at a given point in time.

    The "type\_of\_change" key in the output dictionary can be one of the following: "installed", "removed", "upgraded", or "downgraded". The packages in the output are represented as dictionaries containing the requested set of attributes for the changed packages.

    For installed, upgraded, and downgraded packages, the currently installed version is returned.

    For upgraded and downgraded packages, the "original\_evr" and "original\_arch" attributes are also included, containing the package EVR and architecture before the change.

    If requested, upgraded packages may also include an "advisories" list field, indicating the name of the updates that contain the upgraded (i.e., currently installed) version of the package. If the "all\_advisories" option is set, advisories for all versions between the original and currently installed versions are also included.

    For removed packages, only the name, arch, and evr of the removed version are provided.

    All packages in the output include a "transaction\_time" attribute (uint64, unix timestamp) indicating when the transaction that caused the change was completed.

    Following options and filters are supported:

    - •

      - **upgraded\_packages: boolean, default "true"**

        Whether to include upgraded packages in the output.

    - •

      - **downgraded\_packages: boolean, default "true"**

        Whether to include downgraded packages in the output.

    - •

      - **installed\_packages: boolean, default "true"**

        Whether to include installed packages in the output.

    - •

      - **removed\_packages: boolean, default "true"**

        Whether to include removed packages in the output.

    - •

      - **include\_advisory: boolean, default "true"**

        Whether to include "advisories" to upgraded packages attributes.

    - •

      - **all\_advisories: boolean, default "false"**

        Only make sense with include\_advisory=true. Include also advisories for all versions between the original and currently installed.

    - •

      - **package\_attrs: list of strings, default \["name", "summary", "evr", "arch"\]**

        List of package attributes that are returned for each changed package. Supported attributes are the same as in list() method of the Rpm interface.

    - •

      - **since: int64, unix timestamp**

        Get changes since a given point in time.

    - •

      - **interactive: boolean, default false**

        Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

    Unknown options are ignored.

  - **method list(a{sv} options) -\> (aa{sv} transactions)**

    - **Arguments**

      - •

        **options** (*a{sv}*) -- an array of key/value pairs

    - **Returns**

      - •

        **transactions** (*aa{sv}*) -- array of transactions with their packages

    Get a list of transactions from the history database. Each transaction includes metadata and categorized package changes.

    The packages in each category are represented as dictionaries containing the requested set of attributes. For upgraded and downgraded packages, an "original\_evr" attribute is included with the original package EVR.

    Following options are supported:

    - •

      - **limit: int64**

        Maximum number of transactions to return.

    - •

      - **since: int64, unix timestamp**

        Only return transactions completed after this time.

    - •

      - **reverse: boolean, default "false"**

        If true, return oldest transactions first. Default is newest first.

    - •

      - **contains\_pkgs: list of strings**

        Filter to transactions containing packages with these names.

    - •

      - **transaction\_attrs: list of strings, default \["id", "start", "end", "user\_id", "description", "status"\]**

        List of transaction attributes to include. Supported: id, start, end, user\_id, description, status, releasever, comment.

    - •

      - **package\_attrs: list of strings, default \["name", "arch", "evr"\]**

        List of package attributes to include. Supported: name, epoch, version, release, arch, evr, repo\_id, action, reason.

    - •

      - **include\_packages: boolean, default "true"**

        Whether to include package lists (installed, removed, upgraded, downgraded).

    Unknown options are ignored.

## Author

See AUTHORS.md in dnf5 source distribution.

## Copyright

Contributors to the dnf5 project.
