How to Fix the Windows Terminal Error "Found a profile with an invalid 'icon'. Defaulting that profile to have no icon."

How to Fix the Windows Terminal Error "Found a profile with an invalid 'icon'. Defaulting that profile to have no icon."
Photo by Gabriel Heinzer / Unsplash

This is an issue I have run into a few times after repeatedly installing and removing various versions of Linux on WSL.

Encountered errors while loading user settings

Found a profile with an invalid "icon". Defaulting that profile to have no icon. Make sure when setting an "icon", the value is a valid file path to an image.

This post is a report on the cause of this error and how to fix it.

Cause

A no-longer-used "zombie" profile remains behind in Windows Terminal (in its cache).

Fix

To get rid of this message, I had to reset the profiles once.

Note: be aware that your existing profile settings may be lost.

Step 1: Close Windows Terminal

Close all Windows Terminal windows completely.

Step 2: Delete settings.json

In File Explorer, navigate to the folder containing settings.json and delete the file.

%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\

Step 3: Clear the Windows Terminal "cache"

Open the following folder and delete all files inside it.

%LOCALAPPDATA%\Microsoft\Windows Terminal\

Step 4: Restart Windows Terminal

After restarting Windows Terminal, the zombie profile was gone and the error disappeared as well.

Read more