21 Linux YUM commands for software package management (1)

Source: Internet
Author: User

BKJIA Internet headlines in September 29, 2013: This article describes how to use the YUMYellowdog Updater Modified developed by RedHat to install, update, remove, and search software packages and manage software packages and libraries. The sample commands shown in this article are all tested on our CentOS 6.3 server. You can use these materials for learning and authentication, or just to figure out how to install new software packages, make sure the system version is up to date. The basic requirement in this article is that you need to have a basic understanding of these commands and a normal Linux operating system to explore and execute all the commands listed below.

What exactly is YUM?

YUMYellowdog Updater Modified is an open-source command line and graphical software package management tool for Linux systems based on RPM Red Hat Software Package Manager. It allows users and system administrators to easily install, update, remove, or search for software packages on the system. It is developed and released by Seth Vidal and adopts the GPL General Public License. It is an open source tool. This means that anyone can download and access the code to FIX software errors and develop customized software packages. YUM uses a large number of third-party software libraries to automatically install software packages by solving dependencies of software packages.

1. install the software package using Yum

To install a software package named Firefox 14, run the following command to automatically find and install all necessary dependencies of the Firefox browser.

 
 
  1. # yum install firefox 
  2. Loaded plugins: fastestmirror 
  3. Dependencies Resolved 
  4. ==================================== Package                    Arch        Version                    Repository            Size 
  5. ====================================
  6. Updating: 
  7. firefox                        i686        10.0.6-1.el6.centos     updates             20 M 
  8. Updating for dependencies: 
  9. xulrunner                     i686        10.0.6-1.el6.centos     updates             12 M 
  10. Transaction Summary 
  11. ===========================================Install       0 Package(s) 
  12. Upgrade       2 Package(s) 
  13. Total download size: 32 M 
  14. Is this ok [y/N]: y 
  15. Downloading Packages: 
  16. (1/2): firefox-10.0.6-1.el6.centos.i686.rpm                                |  20 MB   01:10 
  17. (2/2): xulrunner-10.0.6-1.el6.centos.i686.rpm                              |  12 MB   00:52 
  18. ------------------------------------------------------------------------------------------------ 
  19. Total                                                           63 kB/s |  32 MB   02:04 
  20. Updated: 
  21. firefox.i686 0:10.0.6-1.el6.centos 
  22. Dependency Updated: 
  23. xulrunner.i686 0:10.0.6-1.el6.centos 
  24. Complete! 

The preceding Command requires confirmation before installing any software package on your system. If you do not require any confirmation, you can use option-y to automatically install the software package, as shown in the following example.

 
 
  1. # yum -y install firefox 

2. Remove the software package using Yum

To completely remove the software package along with all dependencies, run the following command.

 
 
  1. # yum remove firefox 
  2. Loaded plugins: fastestmirror 
  3. Setting up Remove Process 
  4. Resolving Dependencies 
  5. --> Running transaction check 
  6. ---> Package firefox.i686 0:10.0.6-1.el6.centos set to be erased 
  7. --> Finished Dependency Resolution 
  8. Dependencies Resolved 
  9. ===========================================Package                    Arch        Version                        Repository            Size 
  10. ===========================================Removing: 
  11. firefox                    i686        10.0.6-1.el6.centos            @updates              23 M 
  12. Transaction  Summary 
  13. ===========================================
  14. Remove       1 Package(s) 
  15. Reinstall      0 Package(s) 
  16. Downgrade     0 Package(s) 
  17. Is this ok [y/N]: y 
  18. Downloading Packages: 
  19. Running rpm_check_debug 
  20. Running Transaction Test 
  21. Transaction Test Succeeded 
  22. Running Transaction 
  23. Erasing:firefox-10.0.6-1.el6.centos.i686                                   1/1 
  24. Removed: 
  25. firefox.i686 0:10.0.6-1.el6.centos 
  26. Complete! 

Similarly, the preceding Command requires confirmation before removing the software package. To disable the confirmation prompt, just add option-y, as shown below.

 
 
  1. # yum -y remove firefox 


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.