Bug 1414512 - [rfe] Add dnf api for autoremove
Summary: [rfe] Add dnf api for autoremove
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf   
(Show other bugs)
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Martin Hatina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: EasyFix, FutureFeature, Triaged
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-10 15:50:16 UTC
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)

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.