LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   installing Fedora updates DNF vs YUM (https://www.linuxquestions.org/questions/linux-newbie-8/installing-fedora-updates-dnf-vs-yum-4175561808/)

Janning 12-18-2015 06:41 PM

installing Fedora updates DNF vs YUM
 
Hi,

Im using Fedora version 23 (latest upgrade and upates). Currently to receive the updates, I use:
su -c 'yum update'

This works fine, but I get:
yum command has been deprecated, redirecting to '/usr/bin/dnf update'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'
I have run 'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate' with no errors.

I assume I should now be able to use:
dnf install update

However when I do, every time, I get:
Last metadata expiration check performed 0:59:08 ago on Fri Dec 18 17:30:42 2015.
No package update available.
Error: Unable to find a match.

Please advise, thanks James

timl 12-18-2015 08:07 PM

Hi James,

just replace yum with dnf (I use sudo rather than "su -c" but that is up to you). Keep the exact same format:

Quote:

[tim@dragon ~]$ sudo dnf install update
[sudo] password for tim:
Last metadata expiration check performed 2:54:24 ago on Sat Dec 19 10:09:46 2015.
No package update available.
Error: Unable to find a match.
Indicates that there is no package called update

Quote:

[tim@dragon ~]$ sudo dnf update
Last metadata expiration check performed 2:54:51 ago on Sat Dec 19 10:09:46 2015.
Dependencies resolved.
Nothing to do.
Complete!
Nothing to do because I did an update this morning. However if you try that command (you can still use "su -c") it will keep your system updated

Timothy Miller 12-18-2015 08:25 PM

dnf update

dnf install update attempts to install package update, same as yum install update would try to do. For the most part, dnf is nearly identical to yum in commands, except update & upgrade are now interchangeable.

syg00 12-18-2015 08:56 PM

When in doubt, try "dnf clean all" as a simple first fix.

Janning 12-18-2015 09:22 PM

Quote:

Originally Posted by timl (Post 5466161)
Hi James,

just replace yum with dnf (I use sudo rather than "su -c" but that is up to you). Keep the exact same format:

Indicates that there is no package called update
Nothing to do because I did an update this morning. However if you try that command (you can still use "su -c") it will keep your system updated

U do not need sudo, I'm logged in as root. however I tried sudo dnf install update it did the same thing as su dnf install update
...nothing, it gives the message I stated above. My first thought, was..'well there is nothing to do'....no, when I do the
su -c 'yum update'....there are updates.

Janning 12-18-2015 09:26 PM

Quote:

Originally Posted by Timothy Miller (Post 5466165)
dnf update

dnf install update attempts to install package update, same as yum install update would try to do. For the most part, dnf is nearly identical to yum in commands, except update & upgrade are now interchangeable.

as I stated above....I can do a
dnf install update it will say there is nothing, immediately after, I run
su - 'yum update'.....it will have many updates.

It is my understanding yum is going away, and dnf is the way to go, however...with the above happening, I'm not sure this is good in my case?

Janning 12-18-2015 09:29 PM

Quote:

Originally Posted by syg00 (Post 5466173)
When in doubt, try "dnf clean all" as a simple first fix.

Hi, I did a dnf clean all.....see below. afterwards the first dnf install update did a couple of things...then back to same as before..nothing
As I have said it's my understanding yum is going away, and I need to start using dnf, however, its doing no updates for me.



--------------------
[root@localhost ajfd]# dnf clean all
Cleaning repos: fedora rpmfusion-free updates
: rpmfusion-free-updates-testing
Cleaning up Everything
[root@localhost ajfd]#
[root@localhost ajfd]#
[root@localhost ajfd]#
[root@localhost ajfd]#
[root@localhost ajfd]# dnf install update
RPM Fusion for Fedor 1.3 MB/s | 738 kB 00:00
RPM Fusion for Fedor 728 kB/s | 318 kB 00:00
Fedora 23 - x86_64 - 1.3 MB/s | 14 MB 00:10
Fedora 23 - x86_64 3.9 MB/s | 43 MB 00:11
Last metadata expiration check performed 0:00:34 ago on Fri Dec 18 21:25:22 2015.
No package update available.
Error: Unable to find a match.
[root@localhost ajfd]#
[root@localhost ajfd]#
[root@localhost ajfd]#
[root@localhost ajfd]# dnf install update
Last metadata expiration check performed 0:01:17 ago on Fri Dec 18 21:25:22 2015.
No package update available.
Error: Unable to find a match.
[root@localhost ajfd]#

Janning 12-18-2015 09:30 PM

I guess I could just ask:
I want to keep my Fedora 23 up to date with the latest,,

,,whats the one command line, I can use to do this ???


Keep in mind I do it weekly..at least...sometimes daily, and i'm logged in as root when I do it.
thanks James.

syg00 12-18-2015 09:40 PM

dnf is a drop-in replacement - why do you think you have to install something called update ?.

"dnf update" (su/sudo as desired) works fine although update is deprecated - you have read the manpage ?.
There is (at least) a couple of articles on the wiki too.

jpollard 12-18-2015 09:49 PM

I believe the command you are looking for is "dnf update", NOT "dnf install update".

"dnf install update" makes a request to install the package "update", which doesn't exist.

Janning 12-18-2015 10:22 PM

Quote:

Originally Posted by jpollard (Post 5466194)
I believe the command you are looking for is "dnf update", NOT "dnf install update".

"dnf install update" makes a request to install the package "update", which doesn't exist.

I believe you are correct...this may be the answer I was looking for!
I won't know till there are actually any updates out there to try it on, but running
dnf update
gives the same output as
su -c 'yum update'
both give the below, cause there is nothing there

Last metadata expiration check performed 0:55:41 ago on Fri Dec 18 21:25:22 2015.
Dependencies resolved.
Nothing to do.
Complete!

however I'll say it again, in the past I would run su -c 'dnf update' and get the above then run su -c 'yum update'...immediately after, and get updates.

Timothy Miller 12-18-2015 11:03 PM

Which is what I said...multiple posts ago.

Janning 12-18-2015 11:12 PM

Quote:

Originally Posted by Timothy Miller (Post 5466217)
Which is what I said...multiple posts ago.

Ah, yes you did. I missed that sorry. But, (repeating I know),,,for weeks I have always run
su -c 'dnf update' got nothing, then run su -c 'yum update' right afterwards...and get updates.

I've never used just "dnf update"...when there were actually updates to be had. The next time there are any available, I'll
try just "dnf update", hopefully this will work, and I can no longer use yum.
Thanks much, James

John VV 12-18-2015 11:26 PM

you did not read what you posted
Quote:

dnf install update
su - 'yum update'
the dnf command is way off

you told dnf to install the program "update"

there is NO program called "update"


Code:

su -
dnf update

all yum is in 23 is a simlink to dnf

Code:

su -
cd /usr/bin
ls -la yum


Janning 12-18-2015 11:33 PM

Quote:

Originally Posted by John VV (Post 5466223)
you did not read what you posted

the dnf command is way off

you told dnf to install the program "update"

there is NO program called "update"


Code:

su -
dnf update

all yum is in 23 is a simlink to dnf

Code:

su -
cd /usr/bin
ls -la yum


Right I fintally get the dnf install update issue I had. (I'm new to Linux)
But, what about su -c 'dnf update' vs su -c 'yum update' ?
Shouldn't these do the same thing?...they did not for me. I can run su -c 'dnf update', get nothing, immediately run su -c 'yum update' and get updates.
Thanks James (

timl 12-19-2015 12:55 AM

James, you need to paste exactly what you see on the terminal. Copy the text from your console and then use the quote icon above the message box to show us what you get:

Quote:

[tim@dragon ~]$ su -c 'yum update'
Password:
Yum command has been deprecated, redirecting to '/usr/bin/dnf update'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Last metadata expiration check performed 1:42:46 ago on Sat Dec 19 16:11:46 2015.
Dependencies resolved.
Nothing to do.
Complete!
[tim@dragon ~]$ su -c 'dnf update'
Password:
Last metadata expiration check performed 1:42:56 ago on Sat Dec 19 16:11:46 2015.
Dependencies resolved.
Nothing to do.
Complete!

Janning 12-19-2015 01:00 AM

Quote:

Originally Posted by timl (Post 5466237)
James, you need to paste exactly what you see on the terminal. Copy the text from your console and then use the quote icon above the message box to show us what you get:

What I paste is exactly from the terminal. or am I missing something here?

John VV 12-19-2015 01:12 AM

Quote:

But, what about su -c 'dnf update' vs su -c 'yum update' ?
then this is NOT a "dnf" VS. "yum" issue
but not understanding the "su" command

please see the manual page
Code:

man su
the "-c" option is not really used

also using "su" without the "-" ( this is DIFFERENT than the -c)
will cause update issues

"su" = root but with YOUR normal user $PATH
"su - " = root but with ROOTS!!!! $PATH
( "su - " is a shortcut for "su -l root " )

the two are very different

Janning 12-19-2015 01:52 AM

Quote:

Originally Posted by John VV (Post 5466241)
then this is NOT a "dnf" VS. "yum" issue
but not understanding the "su" command

please see the manual page
Code:

man su
the "-c" option is not really used

also using "su" without the "-" ( this is DIFFERENT than the -c)
will cause update issues

"su" = root but with YOUR normal user $PATH
"su - " = root but with ROOTS!!!! $PATH
( "su - " is a shortcut for "su -l root " )

the two are very different

Hi,
Sorry to be a pain...I'm still not totally getting it. From the very little I know, I never liked using
su -c 'yum update' (I got it off this forum months ago)
to get updates...but, it is the only thing that works, ..so far unless, when new updates are available, I use dnf update and does it for me.

So, (keeping in mind, I open a terminal, and first thing I do is a su root and supply password)
dnf update should do the same thing as yum update ? (realizing yum is depreciated and directs to dnf?)
So basically dnf update = yum update
but, does su -c 'dnf update' do the same as su -c 'yum update' ?(realizing from what you say, this entire command phrase is wrong, I'm already in root so no need)


I know, I know read man su, but, for me, seeing specific examples work better .

timl 12-19-2015 03:43 AM

Quote:

So, (keeping in mind, I open a terminal, and first thing I do is a su root and supply password)
dnf update should do the same thing as yum update ? (realizing yum is depreciated and directs to dnf?)
So basically dnf update = yum update
Yus

Quote:

but, does su -c 'dnf update' do the same as su -c 'yum update' ?(realizing from what you say, this entire command phrase is wrong, I'm already in root so no need)
Yus


All times are GMT -5. The time now is 06:42 AM.