I found the root cause of my issue: I use Scoop to install many applications, which isn’t preserving installed packages when updating MSYS2. I’m not sure which part of the filesystem is preserved and which part isn’t, but reinstalling the dictionaries as I do below (which does indeed install Aspell itself) if they go missing isn’t a big deal.

Only a few months ago, I enabled Flyspell in Emacs to check my spelling. Flyspell uses the GNU Aspell tool under the hood. Since I’m on Windows and Aspell isn’t particularly concerned with Windows compatibility, I tried installing it through MSYS2, which provides native Windows versions of Linux tools. The combination worked for about a month. I don’t know whether I inadvertently changed something about my system configuration, but Flyspell abruptly started displaying this error upon activation:

OutputStarting new Ispell process c:/App/Scoop//apps/msys2/current/ucrt64/bin/aspell.exe with default dictionary...done
Error enabling Flyspell mode:
(Error: No word lists can be found for the language "en_US".
WARNING: Unable to enter Nroff mode: Unknown mode: "nroff".)

A perplexing error, as I thought I already had the dictionaries installed—which is how I’d been using it until then—but after perusing a similar issue in the doom-emacs repository, I decided to humour Aspell and assume the dictionaries were missing. Therefore, I re-installed the base package with pacman -S --noconfirm mingw-w64-ucrt-x86_64-aspell (using MSYS2’s UCRT64 environment) and explicitly installed the English dictionaries as well with pacman -S --noconfirm mingw-w64-ucrt-x86_64-aspell-en. Now it works again.

For future reference, I believe installing the dictionaries would have automatically installed Aspell itself if required, so the second command is probably enough on its own.

Even better, I can run pacman directly with Invoke-Expression "$(scoop prefix msys2)/usr/bin/pacman.exe --noconfirm -S mingw-w64-ucrt-x86_64-aspell-en". And even better than that, I’ve wrapped the command in a PowerShell function so I can simply run Install-MsysAspell next time.