• Breaking News

    INSTALL, REMOVE AND UPGRADE PACKAGES WITH YUM CHEAT SHEET

    If you are a developer, it's highly possible you will face situations where you need to install a new RPM package or update an existing one.

    YUM has a lot of commands, but in this post, I'll focus on those commands that let us manage package installations or updates.



    By default, Yum will automatically attempt to check all configured repositories to resolve all package dependencies during an installation or upgrade. The following is a list of the most commonly-used yum commands. For a complete list of available yum commands, refer to man yum.

    INSTALL, REMOVE AND UPGRAD PACKAGES WITH YUM
    Yum Subcommands
    Descriptions and Tasks
    install
    Install a package from a repository to your system
    # yum install vsftpd
    Install the vsftpd package
    update
    Update one or all packages on your system
    # yum update
    Updated all packages with available updates
    # yum update httpd
    Update the httpd package (if available)
    # yum update --security
    Apply security-related package updates
    update-to
    Update one or all packages to a particular version
    upgrade
    Update packages taking obsolete into account
    localinstall
    Install a package from a local file, http, or ftp# yum localinstall abc-1-1.i686.rpm
    Install abc package from local directory
    # yum localinstall http://myrepo/abc-1-1.i686.rpm
    Install abc from FTP site
    downgrade
    Downgrade a package to an earlier version
    # yum downgrade abc
    Downgrade the abc package to an earlier version
    reinstall
    Reinstall the current version of a package# yum reinstall util-linux
    Reinstall util-linux (to replace any deleted files)
    swap
    Remove one package and install another
    # yum swap ftp lftp
    Remove ftp package and install lftp package
    remove
    Erase a package (and possibly dependencies)
    # yum reomve vsftpd
    Remove the vsftpd package and dependencies
    groupinstall
    Install all packages in the selected group# yum groupinstall "Web server"
    Install Web Server packages
    yumdownloader
    Download a package from a repo to the current directory

    Keep it handy as I do!

    No comments