The environments are installed into a cache:
pre-commitby default places its repository store in~/.cache/pre-commit— this can be configured in two ways:
PRE_COMMIT_HOME: if set,pre-commitwill use that location instead.XDG_CACHE_HOME: if set,pre-commitwill use$XDG_CACHE_HOME/pre-commitfollowing the XDG Base Directory Specification.
disclaimer: I am the author