Keeping Servers Up-to-Date

Centos

As new file patches come out, Centos will need to be updated. Run the following commands to bring the server and its extensions up-to-date:

sudo yum update && sudo yum upgrade -y && sudo package-cleanup --leaves | xargs -l1 yum -y remove

Occasionally you may get this message:

There are unfinished transactions remaining. You might consider running yum-complete-transaction, or “yum-complete-transaction –cleanup-only” and “yum history redo last”, first to finish them. If those don’t work you’ll have to try removing/installing packages by hand (maybe package-cleanup can help).

Start by running:

yum-complete-transaction

Hopefully you get this message: Cleaning up completed transaction file

If you have no errors, go ahead and run:

sudo yum clean all && sudo rm -rf /var/cache/yum

Ubuntu

Run the following commands to bring the server and its extensions up-to-date:

sudo apt update && sudo apt upgrade -y && sudo apt clean all && sudo apt-get autoremove --purge -y && sudo rm -rf /var/cache/apt

Mac running Homebrew

brew update && brew upgrade && brew cleanup && brew doctor && brew services restart --all

Leave a Reply

Your email address will not be published. Required fields are marked *