dnf can be unnecessarily complicated
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2017
    Location
    USA
    Posts
    71

    Unhappy dnf can be unnecessarily complicated

    I just spent about 30 minutes figuring out how to "remove" a no longer needed repository. There is no easily recognized dnf command to do so, even with extensive review and re-reviews of the dnf man page.

    I did finally find the answer buried within the config-manager dnf subcommand: dnf config-manager --disable-repo <repoid>

    What a pain!

    Tim

  2. #2
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,390

    Re: dnf can be unnecessarily complicated

    Tim,
    Did you try "man dnf" or "info dnf"? removing a repository is not necessary. The repositories are stored in /etc/yum.repos.d
    vi the target repositories and change lines with enabled to
    enabled=0

    That tells dnf and dnfdragora, to skip over this repository
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  3. #3
    Join Date
    Mar 2017
    Location
    USA
    Posts
    71

    Re: dnf can be unnecessarily complicated

    I was using "man dnf". Does it have an info page? If so, that is awesome! So many things do not that I've almost stopped trying info.

    And how was I supposed to find the information to edit /etc/yum.repos.d? Even with all my searching, I never came across anything like that.

    BTW, the solution I found was in the full documentation for dnf, i.e., https://docs.fedoraproject.org/f27/s...ement/DNF.html

    I suppose I'm just too much of a Fedora newbie; I've been using it since February. But, I've been managing UNIX systems since 1981 or so, and other Linux distros for well more than 10 years.

    Tim

  4. #4
    Join Date
    Mar 2017
    Location
    USA
    Posts
    71

    Re: dnf can be unnecessarily complicated

    PS - I wanted to remove the repo because it apparently no longer exists, and it was nagging me about it every time I ran dnf.

    Tim

  5. #5
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    6,379

    Re: dnf can be unnecessarily complicated

    i take the sledgehammer approach. the directory /etc/yum.repos.d contains all the repo files, so I just delete the offending *.repo file as it has the same effect. It's easier than messing about with config-manager and remembering which command to type

  6. #6
    Join Date
    Mar 2017
    Location
    USA
    Posts
    71

    Re: dnf can be unnecessarily complicated

    Quote Originally Posted by antikythera
    i take the sledgehammer approach. the directory /etc/yum.repos.d contains all the repo files, so I just delete the offending *.repo file as it has the same effect. It's easier than messing about with config-manager and remembering which command to type
    Ok, I can agree with that, but one can only do it if one knows about it.

    Tim

  7. #7
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,390

    Re: dnf can be unnecessarily complicated

    Just edit the offending repro, and change the "enabled=1 to enabled=0 within the repro. By the way, that is what dnf does via the dnf command
    If ever you wanted it enabled for some specific update, reverse the enabled=0 value.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  8. #8
    Join Date
    Jun 2010
    Posts
    377

    Re: dnf can be unnecessarily complicated

    Quote Originally Posted by tim8723
    And how was I supposed to find the information to edit /etc/yum.repos.d? Even with all my searching, I never came across anything like that.
    The FILES section at the bottom of the manual mentions the repository configuration directory.

  9. #9
    Join Date
    Nov 2016
    Location
    Germany
    Posts
    31

    Re: dnf can be unnecessarily complicated

    I found a more sensible solution than a sledgehammer ...

    http://dnf.readthedocs.io/en/latest/...fying-packages

    Failing to match the input argument to an existing package name based on the patterns above, DNF tries to see if the argument matches an existing provide.
    So let us try

    Code:
    [root@linux ~]# dnf remove /boot/vmlinuz-4.14.6-300.fc27.x86_64
    Dependencies resolved.
    ==========================================================================================================================================================================
     Package                                         Arch                              Version                                      Repository                           Size
    ==========================================================================================================================================================================
    Removing:
     kernel-core                                     x86_64                            4.14.6-300.fc27                              @updates                             55 M
    Removing dependent packages:
     kernel                                          x86_64                            4.14.6-300.fc27                              @updates                              0  
     kernel-modules                                  x86_64                            4.14.6-300.fc27                              @updates                             24 M
     kernel-modules-extra                            x86_64                            4.14.6-300.fc27                              @updates                            2.0 M
    
    Transaction Summary
    ==========================================================================================================================================================================
    Remove  4 Packages                                                                                                                                                        
                                                                                                                                                                              
    Freed space: 81 M                                                                                                                                                         
    Is this ok [y/N]:                                                                                                                                                         
    Operation aborted.                                                                                                                                                        
    [root@linux ~]#
    or applied to repos

    Code:
    [root@linux ~]# dnf remove /etc/yum.repos.d/rpmfusion-free.repo
    Dependencies resolved.
    ==========================================================================================================================================================================
     Package                                            Arch                               Version                          Repository                                   Size
    ==========================================================================================================================================================================
    Removing:
     rpmfusion-free-release                             noarch                             27-1                             @rpmfusion-free                             8.7 k
    
    Transaction Summary
    ==========================================================================================================================================================================
    Remove  1 Package
    
    Freed space: 8.7 k
    Is this ok [y/N]: 
    Operation aborted.
    [root@linux ~]#
    I don't want to test it now, but it should remove the repo cleanly.

    Best regards,
    Bequimão

  10. #10
    Join Date
    Mar 2017
    Location
    USA
    Posts
    71

    Re: dnf can be unnecessarily complicated

    Thank you, Bequimão

    Tim

Similar Threads

  1. Complicated Task
    By inufreak483 in forum Hardware & Laptops
    Replies: 0
    Last Post: 4th October 2007, 02:02 AM
  2. Very Complicated To Solve!!
    By adarsh in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 6th September 2007, 06:11 AM
  3. Complicated network routing
    By 105547111 in forum Servers & Networking
    Replies: 6
    Last Post: 20th April 2007, 04:57 PM
  4. Replies: 18
    Last Post: 23rd July 2006, 03:51 AM
  5. Is it just me or is this unnecessarily difficult?
    By macgregor in forum Programming & Packaging
    Replies: 2
    Last Post: 18th August 2005, 10:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •