How to Update Linux Kernel In Ubuntu – Linux Tips And Tricks

Learn how to update and upgrade your Linux kernel in Ubuntu.

What is difference between update and upgrade in Linux?
The update command only retrieves details about the most recent packages that are accessible on your system. No packages are downloaded or installed by it (just gets the package list). The actual download and update of the package to the new version is handled by the apt upgrade command.

Update the package list
sudo apt-get update

Get list of packages that will be upgraded (downloaded and installed)
apt list –upgradable

Don’t upgrade “libfwupd2” package
sudo apt-mark hold libfwupd2

Upgrade “libfwupd2” package
sudo apt-mark unhold libfwupd2

Upgrade packages
sudo apt-get upgrade

ls /var/lib/apt/lists/*

Run both update and upgrade package
sudo apt-get update && sudo apt-get upgrade -y

My favorite way to running update and upgrade (clean downloaded packages)
sudo apt-get update && sudo apt-get upgrade -y && rm -rf /var/lib/apt/lists/*

#linux #ubuntu #redhat #bash


Leave a Reply

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