DEV Community

Aldrine Quijano
Aldrine Quijano

Posted on

Can’t Install .NET 10 on Ubuntu via apt? Here’s a Workaround That Actually Works

I recently tried installing .NET 10 SDK on Ubuntu 24.04 (Noble) using apt, following Microsoft’s documentation.

It should have been simple.

But, I ran into this:

E: Unable to locate package dotnet-sdk-10.0
E: Couldn't find any package by glob 'dotnet-sdk-10.0'
Enter fullscreen mode Exit fullscreen mode

If you’re seeing the same error — this post is for you.


TL;DR

  • dotnet-sdk-10.0 may not be available via apt yet, depending on your region

  • This is due to APT repository propagation, not a broken setup

  • Microsoft’s official install script is the supported workaround

  • Installing the SDK also installs the runtime

  • You can safely keep .NET 8, 9, and 10 side-by-side


The Problem: apt Can’t Find .NET 10 (Yet)

I already had Microsoft’s Ubuntu repo configured:

https://packages.microsoft.com/ubuntu/24.04/prod

Still, installing the SDK failed:

sudo apt-get update
sudo apt-get install dotnet-sdk-10.0
Enter fullscreen mode Exit fullscreen mode

Result:

E: Unable to locate package dotnet-sdk-10.0
Enter fullscreen mode Exit fullscreen mode

🔍Why this happens

Microsoft rolls out APT packages gradually across mirrors and regions. That means:

  • Some users can install .NET 10 immediately

  • Others won’t see it yet

  • apt cannot install packages that haven’t reached your mirror

You can confirm availability with:

apt-cache policy dotnet-sdk-10.0
Enter fullscreen mode Exit fullscreen mode

If it says “Unable to locate package”, the SDK simply isn’t there yet.


The Workaround: Microsoft's Official Install Script

Until the APT package reaches your region, the recommended workaround is Microsoft’s own installer script.

✅** Install .NET 10 SDK**

wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --channel 10.0
Enter fullscreen mode Exit fullscreen mode

This installs .NET 10 under:

$HOME/.dotnet
Enter fullscreen mode Exit fullscreen mode

⚠️Important: Set Environment Variables

If you install via the script, you must add .NET to your PATH.

Add this to your shell profile (~/.bashrc or ~/.zshrc):

export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Enter fullscreen mode Exit fullscreen mode

Then reload your shell:

source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

✅ Verify the install

dotnet --list-sdks
Enter fullscreen mode Exit fullscreen mode

Expected output:

10.0.101 [/home/youruser/.dotnet/sdk]
Enter fullscreen mode Exit fullscreen mode

Side-by-Side with .NET 8 and 9

Installing .NET 10 this way does not break existing installations.

You can safely have:

.NET 8 (via apt)

.NET 9 (via apt)

.NET 10 (via script)

Once dotnet-sdk-10.0 becomes available via apt in your region, you can switch back to a fully package-managed setup.


Final Thoughts

If apt can’t find .NET 10 on Ubuntu 24.04 yet:

You’re not misconfigured

The package just hasn’t reached your mirror

The official install script is safe and supported

I’ll still switch back to installing .NET 10 via apt once it’s available in my region — but until then, this workaround works perfectly.

Top comments (0)