10

In yum when you do an update with yum update you normally get all success and error messages output on the CLI.

Is there any way to have yum suppress all successful package installations and only print out when there was an error installing a package?

2 Answers 2

16
yum update -q -y

The -q is quiet mode.

The -y assumes yes to everything.

This still prints errors.

1
  • I'm not really sure why, but yum update -yq doesn't work for me. The -y and -q have to be separate, like they are in the example.
    – Stephen C
    Commented Sep 27, 2019 at 4:53
3

The simplest way would probably be to redirect message output.

You can redirect standard message output to send non-error messages to /dev/null (aka not print them). For this, you must automatically accept updates, otherwise it will appear to stall.

yum -y update 1> /dev/null

This still prints error messages. If you want to send the error messages to a file, you can append 2>> [file] to the command to make the total command:

yum -y update 1> /dev/null 2>> [file]

Note: 2>> appends the output to a file, and 2> replaces the file.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .