How to fix PlatformIO "UnknownPackageError: Could not find the package ...." for recently updated package

Problem:

When you want to install a PlatformIO library which has been updated recently, you see an error message such as

UnknownPackageError: Could not find the package with 'ulikoehler/QuickSPI @ ^1.1.1' requirements for your system 'linux_x86_64

Solution

Delete the ~/.platformio/.cache, then try again.

On Windows, this is directory located here: C:\Users\<user>\.platformio\.cache