Skip to content

Commit

Permalink
feat(dnf): add remove pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
remigermain authored and kdeldycke committed Oct 27, 2024
1 parent 607b4ba commit 5239c30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions meta_package_manager/managers/dnf.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ def cleanup(self) -> None:
self.run_cli("--assumeyes", "autoremove", sudo=True)
self.run_cli("clean", "all")

def remove(self, package_id: str) -> str:
"""Remove one package and one only.
.. code-block:: shell-session
β–Ί sudo dnf --color=never --assumeyes autoremove package_id
"""

return self.run_cli("--assumeyes", "autoremove", package_id, sudo=True)


class YUM(DNF):
"""Yum is dnf is yum."""
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Meta Package Manager,zypper,1
| [`cask`](https://github.com/Homebrew/homebrew-cask) | 2.7.0 | | | 🍎 | | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| [`choco`](https://chocolatey.org) | 2.0.0 | | | | | πŸͺŸ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | | |
| [`composer`](https://getcomposer.org) | 1.4.0 | πŸ…±οΈ | 🐧 | 🍎 | `>_` | πŸͺŸ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | | βœ“ |
| [`dnf`](https://github.com/rpm-software-management/dnf) | 4.0.0 | πŸ…±οΈ | 🐧 | | `>_` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | βœ“ | βœ“ |
| [`dnf`](https://github.com/rpm-software-management/dnf) | 4.0.0 | πŸ…±οΈ | 🐧 | | `>_` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| [`emerge`](https://wiki.gentoo.org/wiki/Portage#emerge) | 3.0.0 | πŸ…±οΈ | 🐧 | | `>_` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | βœ“ | βœ“ |
| [`flatpak`](https://flatpak.org) | 1.2.0 | πŸ…±οΈ | 🐧 | | `>_` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | | βœ“ |
| [`gem`](https://rubygems.org) | 2.5.0 | πŸ…±οΈ | 🐧 | 🍎 | `>_` | πŸͺŸ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | βœ“ |
Expand All @@ -136,7 +136,7 @@ Meta Package Manager,zypper,1
| [`winget`](https://github.com/microsoft/winget-cli) | 1.7 | | | | | πŸͺŸ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | |
| [`yarn`](https://yarnpkg.com) | 1.20.0 | πŸ…±οΈ | 🐧 | 🍎 | `>_` | πŸͺŸ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | βœ“ |
| [`yay`](https://github.com/Jguer/yay) | 11.0.0 | πŸ…±οΈ | 🐧 | | `>_` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| [`yum`](http://yum.baseurl.org) | 4.0.0 | πŸ…±οΈ | 🐧 | | `>_` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | βœ“ | βœ“ |
| [`yum`](http://yum.baseurl.org) | 4.0.0 | πŸ…±οΈ | 🐧 | | `>_` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| [`zypper`](https://en.opensuse.org/Portal:Zypper) | 1.14.0 | πŸ…±οΈ | 🐧 | | `>_` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | βœ“ | βœ“ |

[^bsd_without_macos]: BSD: FreeBSD, NetBSD, OpenBSD, SunOS.
Expand Down

0 comments on commit 5239c30

Please sign in to comment.