After I deleted a script (on purpose), I am unable to compile because Unity is unable to find the script I deleted.

Like, that’s the point Unity. What am I doing wrong?

Specifically it says the file I deleted “could not be found”

It seems you loosely transcripted the actual error you got from memory which is generally not a great way to ask a question. Please copy&paste the actual error or at least post a screenshot of the console. However there could only be 3 possible cases i can think of:

You may have deleted your script but you still had the script attached to some gameobject in a scene or inside a prefab which you did not remove.

You may have deleted the file outside of Unity manually and you left over the .meta file. This will usually just cause a one-time-warning / error as unity will delete the meta file after that.

Finally you may have another script which contains code which directly referenced the class in the script you deleted. Of course you have to remove / adjust any code that still tries to use the class which no longer exists.

Since we don’t know the actual error you get we can’t give you any more information.

Well I feel silly, just restarted Unity to fix it:p