This is the Best Command to Upgrade Ubuntu

This is the only command I’ll use to upgrade or update the OS on my Ubuntu instances, any version. This doesn’t upgrade to the next version of ubuntu, only to the latest of the version you’re running now.

Here’s the breakdown:

Erase downloaded archive files, cleans up old data and forces re-downloading package info.

 

Update the list of packages Ubuntu “knows” about.

 

Run the actual upgrade.

 

Remove packages you don’t need anymore, freeing space.