This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1414512 - [rfe] Add dnf api for autoremove
[rfe] Add dnf api for autoremove
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: Martin Hatina
Fedora Extras Quality Assurance
: EasyFix, FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-18 12:16 EST by Alberto Murillo
Modified: 2017-02-10 10:50 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-10 10:50:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alberto Murillo 2017-01-18 12:16:45 EST
Description of problem:
dnf api lacks an option for `dnf autoremove`

Version-Release number of selected component (if applicable):
1.1.10

Im working on adding `dnf autoremove` for the dnf module in ansbile. The related issue is here: https://github.com/ansible/ansible/issues/18815

Currently the only way to autoremove unneeded packages is by explicitly removing one installed package and dnf would autoremove all other unneeded packages by default but there is no way to just remove the unneeded packages without marking an installed package for removal too.

A base.autoremove() api can get be used for this task.

A base.sack.query().unneeded() api could make it possible to get a list of the packages that are candidate to be removed and have more control over the packages
to remove than base.autoremove()
Comment 1 Martin Hatina 2017-01-30 08:55:58 EST
Fixed by https://github.com/rpm-software-management/dnf/pull/716
Comment 2 Jaroslav Mracek 2017-02-10 10:50:16 EST
Bugs fixed in version 2.0.1-1.

Note You need to log in before you can comment on or make changes to this bug.