Bug 1414512 - [rfe] Add dnf api for autoremove
Summary: [rfe] Add dnf api for autoremove
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Martin Hatina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-18 17:16 UTC by Alberto Murillo
Modified: 2017-02-10 15:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-10 15:50:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alberto Murillo 2017-01-18 17:16:45 UTC
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 13:55:58 UTC
Fixed by https://github.com/rpm-software-management/dnf/pull/716

Comment 2 Jaroslav Mracek 2017-02-10 15:50:16 UTC
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.