How To Upgrade Or Update CentOS 7
Upgrade CentOS to Latest Version: 3 Easy Steps
Step 1: Check for available updates
Check available CentOS updates with the command:
sudo yum check-update
The system will display a list of available updates, including the core operating system updates. Scan through these to make sure everything is in order.
A good habit is to scan for software that you’ve specifically configured or installed. If you see a familiar package listed, it can indicate that there are updates or changes you’ll want to be aware of. You can research the upgrades to software packages as needed, depending on your system configuration.
Step 2: Package manager cleanup
As the yum package manager updates your system and software, it accumulates additional listings and downloaded data.
To clear these out of your system use the terminal command:
sudo yum clean all
Reboot the server with:
This will clear the caches and lists in the local yum repositories. This can help speed the update process, and it can also help prevent issues.
Step 3: Update CentOS
Enter the command into the terminal:
sudo yum update
The system should give you a listing of the packages to be downloaded, as well as the disk space required. The system will prompt you to confirm this is OK – press y, and the system will continue with the download and installation.