How to Update .NET Core On Ubuntu 18.04 Linux

In this blog post, I will show you how I update .NET Core on my Ubuntu Linux 18.04 server using a few simple commands.

About .NET Core

Microsoft .NET Core is a free open source software framework that runs on Windows, Linux and MacOS.

The first .NET Core version was released on June 2017, and the version number was .NET Core 1.0.

As writing these lines, the latest .NET Core version release is 2.2.104, and .NET Core 3.0 is scheduled to go GA later this year with the release of Visual Studio 2019.

Get Started

To get started with the update process, I run the two commands below on my Linux machine to remove the old .NET version.

sudo dpkg --purge packages-microsoft-prod
sudo dpkg -i packages-microsoft-prod.deb

Once the two commands finished, I run the following command to install the latest .NET Core version

sudo apt-get install dotnet-sdk-2.2

After the installation process is completed, I run the command below to check that the latest version was installed.

dotnet --version