One thing to try would be to make sure you are running projectile-invalidate-cache
from the project you want to clear out files for (i.e., from a buffer that is visiting a file in that project. From the docs for projectile-invalidate-cache
:
Remove the current project's files from `projectile-projects-cache'.
Note it is supposed to work only for the "current project".
However, I have also not had much luck with this command (potentially this is me not using the command correctly). What I often end up doing is deleting the actual cache file (in my case this is ~/.emacs.d/projectile.cache
. I have not noticed any negative effects of this, and your cache will be rebuilt without the deleted files next time you use projectile
.