Pages

Explore the " rpm " Command Operations - Part I

How to Install an rpm package 

# rpm -ivh  httpd-2.0.46-32.ent.3.i386.rpm

The above command will upgrade the httpd package

How to Upgrade a package

#rpm -Uvh httpd-2.0.46-32.ent.3.i386.rpm

The above command upgrade the http package

How to Un-install a rpm package

#rpm -e httpd-2.0.46-32.ent.3.i386.rpm

The above command removes the http package


How to remove the rpm from the rpm database

#rpm -e --justdb package-name

The above command will remove the entry of the package from the rpm database without  removing the package or any of the files associated with the package. after executing above command, you won't be able to execute any rpm/yum/zypper commands over the package 


How to Unpack / Install rpm in Custom Location

#mkdir /tmp/rpm
#cp /tmp/rpm
#rpm2cpio  httpd-2.0.46-32.ent.3.i386.rpm | cpio -idmv

The above command extracts http package rpm in /tmp/rpm directory

How to remove an rpm installed in a "chrooted" enviorment

#rpm --root=/tmp/root -q <package Name>
#rpm --root=/tmp/root -e <package Name>


Use the --root flag with rpm to indicate where rpm database is for chrooted environment


How do you remove multiple rpm packages with the same name

# rpm -e --allmatches <packagename>



No comments:

Post a Comment