RPM commands

RPM commands

RPM commands 150 150 Roderick Derks

# rpm -ivh packages(s).rpm
install rpm file(s)

# rpm -Uvh packages(s).rpm   
upgrade system with rpms

# rpm -e package   
remove package

# rpm -q package   
show version of package installed

# rpm -q -i package   
show all package metadata

# rpm -q -f /path/file   
what package does file belong

# rpm -ql packagename > list.txt
Lists all the files in a currently installed package – there's no need to use the .rpm extension or its version number.  So if the package's full file name is: wget-1.8.2-4.72.i386.rpm   then just use wget

# rpm -ql packagename > list.txt
Lists all the files in a currently installed package – there's no need to use the .rpm extension or its version number.  So if the package's full file name is: wget-1.8.2-4.72.i386.rpm   then just use wget

# rpm -qpl packagename.rpm > list.txt
Lists all the files in an RPM file irrespective of whether it is installed.. Use the full file name, or, for instance, a shortened version wget* .

# rpm -qa > rpmlot.txt
Lists the names of all installed packages, I assume in order of their installation.

# rpm -qa | sort > rpmlot.txt
Ditto alphabetically sorted.

# rpm -qal > rpmlotfiles.txt
Lists all the files of all installed packages. There is no clear indication of what package the files belong to – but it is not too hard to figure it out:

# rpm -qf file-name
Lists the package a file belongs to.

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message