Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Tutorials»Linux RPM Comamnd with 10 Useful Examples

    Linux RPM Comamnd with 10 Useful Examples

    By RahulApril 23, 20133 Mins Read

    RPM Stands for Redhat Package Manager. RPM command is used for managing rpm software packages in your linux machine. Using rpm command we can install, upgrade, remove, list packages.

    Advertisement

    rpm-structure-2

    1. Installing RPM in System.

    Use below command to install and vsftpd RPM in system.

    # rpm -ivh vsftpd-2.3.5-2.el6.i686.rpm
    

    Sample output:

    warning: vsftpd-2.3.5-2.el6.i686.rpm: Header V3 DSA/SHA1 Signature, key ID e9bc4ae1: NOKEY
    Preparing...                ########################################### [100%]
       1:vsftpd                 ########################################### [100%]
    
    2. Update the installed RPM Package.

    If you already installed an RPM so you can simply upgrade it with new version.

    # rpm -Uvh vsftpd-2.3.5-2.el6.i686.rpm
    
    3. Check installed RPM Package.

    After installation of a package to check for proper installation, Use -q to query to installed package.

    # rpm -q vsftpd
    vsftpd-2.3.5-2.el6.i686
    
    4. List all installed RPM Package.

    The below Example lists all installed package in your system.

    # rpm -qa
    
    Example 5: Remove installed RPM Package.

    Below command will erase ( uninstall ) rpm package from your system.

    # rpm -e vsftpd
    vsftpd-2.3.5-2.el6.i686
    
    6. Get more details of RPM Package.

    This command will show you details about an RPM, like Name, version release and short descritpion.

    # rpm -qip vsftpd-2.3.5-2.el6.i686.rpm
    

    Sample output:

    warning: vsftpd-2.3.5-2.el6.i686.rpm: Header V3 DSA/SHA1 Signature, key ID e9bc4ae1: NOKEY
    Name        : vsftpd                       Relocations: (not relocatable)
    Version     : 2.3.5                             Vendor: (none)
    Release     : 2.el6                         Build Date: Thu 23 Feb 2012 07:38:59 AM IST
    Install Date: (not installed)               Build Host: localhost
    Group       : System Environment/Daemons    Source RPM: vsftpd-2.3.5-2.el6.src.rpm
    Size        : 453460                           License: GPLv2 with exceptions
    Signature   : DSA/SHA1, Fri 11 Jan 2013 06:48:45 PM IST, Key ID 8fbd1684e9bc4ae1
    URL         : http://vsftpd.devnet.ru
    Summary     : Very Secure Ftp Daemon
    Description :
    vsftpd is a Very Secure FTP daemon. It was written completely from
    scratch.
    
    7. List all files in RPM Package.

    This command will list all files inside a RPM package. This is usefull for finding importent files of RPM.

    # rpm -qlp vsftpd-2.3.5-2.el6.i686.rpm
    

    Sample Output:

    warning: vsftpd-2.3.5-2.el6.i686.rpm: Header V3 DSA/SHA1 Signature, key ID e9bc4ae1: NOKEY
    /etc/logrotate.d/vsftpd
    /etc/pam.d/vsftpd
    /etc/rc.d/init.d/vsftpd
    /etc/vsftpd
    /etc/vsftpd/ftpusers
    /etc/vsftpd/user_list
    /etc/vsftpd/vsftpd-403-serv.html
    /etc/vsftpd/vsftpd-403.html
    /etc/vsftpd/vsftpd-404.html
    /etc/vsftpd/vsftpd-browse.html
    /etc/vsftpd/vsftpd-browse_line.html
    /etc/vsftpd/vsftpd-site.conf.sample
    /etc/vsftpd/vsftpd.conf
    /etc/vsftpd/vsftpd.pasv_rules
    /etc/vsftpd/vsftpd_conf_migrate.sh
    /usr/sbin/vsftpd
    /usr/share/doc/vsftpd-2.3.5
    /usr/share/doc/vsftpd-2.3.5/AUDIT
    /usr/share/doc/vsftpd-2.3.5/BENCHMARKS
    /usr/share/doc/vsftpd-2.3.5/BUGS
    /usr/share/doc/vsftpd-2.3.5/COPYING
    /usr/share/doc/vsftpd-2.3.5/Changelog
    /usr/share/doc/vsftpd-2.3.5/Example
    /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES
    /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/403-serv.html
    /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/403.html
    /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/404.html
    /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/browse.html
    /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/browse_line.html
    /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE
    /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE/README
    /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE/vsftpd.conf
    /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE/vsftpd.xinetd
    /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE_NOINETD
    /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE_NOINETD/README
    /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE_NOINETD/vsftpd.conf
    /usr/share/doc/vsftpd-2.3.5/Example/PER_IP_CONFIG
    /usr/share/doc/vsftpd-2.3.5/Example/PER_IP_CONFIG/README
    /usr/share/doc/vsftpd-2.3.5/Example/PER_IP_CONFIG/hosts.allow
    /usr/share/doc/vsftpd-2.3.5/Example/README
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_HOSTS
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_HOSTS/README
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS/README
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS/logins.txt
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS/vsftpd.conf
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS/vsftpd.pam
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS_2
    /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS_2/README
    /usr/share/doc/vsftpd-2.3.5/FAQ
    /usr/share/doc/vsftpd-2.3.5/INSTALL
    /usr/share/doc/vsftpd-2.3.5/LICENSE
    /usr/share/doc/vsftpd-2.3.5/README
    /usr/share/doc/vsftpd-2.3.5/README.security
    /usr/share/doc/vsftpd-2.3.5/REWARD
    /usr/share/doc/vsftpd-2.3.5/SECURITY
    /usr/share/doc/vsftpd-2.3.5/SECURITY/DESIGN
    /usr/share/doc/vsftpd-2.3.5/SECURITY/IMPLEMENTATION
    /usr/share/doc/vsftpd-2.3.5/SECURITY/OVERVIEW
    /usr/share/doc/vsftpd-2.3.5/SECURITY/TRUST
    /usr/share/doc/vsftpd-2.3.5/SIZE
    /usr/share/doc/vsftpd-2.3.5/SPEED
    /usr/share/doc/vsftpd-2.3.5/TODO
    /usr/share/doc/vsftpd-2.3.5/TUNING
    /usr/share/doc/vsftpd-2.3.5/vsftpd.xinetd
    /usr/share/man/man5/vsftpd.conf.5.gz
    /usr/share/man/man8/vsftpd.8.gz
    /var/ftp
    /var/ftp/pub
    
    8. Search RPM to which a File Belongs.

    Using below command you can find about file to which rpm its belongs.

    # rpm -qf /etc/vsftpd/ftpusers
    vsftpd-2.3.5-2.el6.i686
    
    9. List the dependencies of RPM Package.

    This command will list all dependencies of rpm.

    # rpm -qpR vsftpd-2.3.5-2.el6.i686.rpm
    
    10. Revert RPM Package to Older Version.

    If you have accidentally upgraded your rpm to newer version, you can downgrade it again using below command.

    rpm -Uvh --oldpackage vsftpd-<old-version>.el6.i686.rpm
    

    linux rpm rpm rpm -ivh rpm -q rpm -Uvh rpm command rpm install rpm list what is rpm
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Understanding 2>&1 in Bash: A Beginner’s Guide

    How to Choose the Best Shebang (#!) for Your Shell Scripts

    Modulus Operator (%) in Bash

    Using Modulus Operator (%) in Bash

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.