How To Update and Upgrade Ubuntu, Debian, Mint and Kali?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/update-and-upgrade-ubuntu-debian-mint-and-kali/
PINTEREST
PINTEREST
INSTAGRAM

Ubuntu, Debian, Kali and Mint uses the same package management software named dpkg and apt. Updating OS is important part of the system administration. We will look how to update and upgrade deb based distributions.

Update Package Index

First step to update packages for Ubuntu, Debian, Kali and Mint is updating package index. Package index holds most recent available packages from the repository and crosscheck with all ready installed packages. Than upgrade-able packages are created. We need root privileges to run this command. So we use sudo

Update Package Index

Update Package Index

List Upgradeable Packages

We can list currently upgrade-able packages. We will use apt list command with --upgradeable option.

Upgrade All Packages

Now we have required information to upgrade packages. We also know which packages will be upgraded by listing upgrade-able packages. We will upgrade with apt dist-upgrade which will upgrade and made version selection automatically. We required root privileges which is given by sudo.

Upgrade Specific Package

In previous example we will upgraded all newly versioned packages. But in some cases like comp ability this make break comp-ability of existing software. We may need to upgrade specific packages. We will upgrade specific package by giving the package name to the dist-upgrade command as parameter. In this example we will upgrade package named tmux.

Update and Upgrade In Single Shot

In daily operations we may need fast and furious solution whic will update and upgrade packages. I generally bind two command together to make things faster and still reliable. If update operation fails upgrade will not start with the following command.

LEARN MORE  How To Add New Repository To Apt In Linux

Update and Upgrade In Single Shot

Update and Upgrade In Single Shot

Clean Package Cache

Over time the downloaded packages and package metada will be hold in cache. This will take some space from our disk. We need to clean this cache periodically to get our disk space. We can clean our apt and dpkg cache with autoclean option.

Remove Unneeded Packages

Over time some packages are obsolete or not needed by their parents. These package are not update nor removed automatically. We can remove these unneeded packages with autoremove option like below.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/update-and-upgrade-ubuntu-debian-mint-and-kali/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)