Re: rpm erase or removal of rpms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Be careful with a "-y" on a dnf/yum remove.  I have seen yum/dnf determine that a lot of packages need to go.  The protected multi-lib/packages may stop a total disaster, but you could also remove a lot of packages you don't want to remove and have to go back through the list and reinstall a lot.

I have seen people do the removes's without the -y and watch screen fulls of packages scroll by and still answer 'y', and destroy a system (pre-protected-multi-lib).

For a non-automated one-of remove the additional safety gained by having to answer y after seeing that what it wants to remove is a small price to pay.

On Mon, May 23, 2022 at 4:22 PM Thomas Cameron <thomas.cameron@xxxxxxxxxxxxxxx> wrote:
On 5/23/22 15:53, Bill Cunningham wrote:
> I have been trying to use rpm or dnf to remove some rpms. Most the
> ones I am concerned with are docker related, and or to do with go
> (golang). You certainly can't use wildcards with rpm erase. I have a
> list generated with the date these rpms were installed, but I am not
> THAT good with CLI and bash operations like cut, xargs, sed and so on
> to alter the list; and I wouldn't be sure how to pipe the list
> contents or redirect to rpm the text's content from the ascii text
> file, to erase these particular rpms. Is there a way to mass erase
> many files (with rpm switches or such) using rpm? Here is an example
> of what I have been trying to do, ex:
>
>     list.txt,
>
>
> gcc-devel // example,
>
> python-devel //example
>
> rpm -e // would this list content be redirectable to rpm -e ?
>
> cat list.txt
>
> lists rpms,
>
> rpm -e < cat list, or
>
> cat list | rpm -e
>
> do not work.
>
>
>
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam on the list, report it:
> https://pagure.io/fedora-infrastructure

Write your list so that all the packages are on a single line, and just
add rpm -e to the head of that line:

rpm -e foo bar baz

Or:

for i in `cat list`; do rpm -e $i

I would honestly probably use yum for this, though, since it takes care
of dependencies and the like.

So if your list of packages is:

foo bar baz

I would just add "yum remove" to the beginning of the list:

yum -y remove foo bar baz

Thomas
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux