yum/rpm update setup fails with error: unpacking of archive failed on file /etc/shadow.rpmnew: cpio: rename

Solution Verified - Updated -

Issue

  • Attempting to update some packages fails with cpio: rename errors, e.g.:

    # yum update
    . . .
    Resolving Dependencies
    --> Running transaction check
    ---> Package setup.noarch 0:2.8.71-9.el7 will be updated
    ---> Package setup.noarch 0:2.8.71-10.el7 will be an update
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    =====================================================================================================
    Package        Arch          Version           Repository              Size
    =====================================================================================================
    Updating:
       setup        noarch      2.8.71-10.el7        rhel-7-server-rpms        166 k
    
    Transaction Summary
    =====================================================================================================
    Upgrade  1 Package
    
    Total download size: 166 k
    Is this ok [y/d/N]: y
    Downloading packages:
    setup-2.8.71-10.el7.noarch.rpm                                                                                                                   | 166 kB  00:00:01
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
     Updating   : setup-2.8.71-10.el7.noarch                                                                                                                           1/2
    Error unpacking rpm package setup-2.8.71-10.el7.noarch
    error: unpacking of archive failed on file /etc/shadow.rpmnew: cpio: rename
     Verifying  : setup-2.8.71-10.el7.noarch                                                                                                                           1/2
    setup-2.8.71-9.el7.noarch was supposed to be removed but is not!
     Verifying  : setup-2.8.71-9.el7.noarch                                                                                                                            2/2
    
    Failed:
     setup.noarch 0:2.8.71-9.el7                                                        setup.noarch 0:2.8.71-10.el7
    
    Complete!
    

Environment

  • Red Hat Enterprise Linux (ALL)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content