3.1.3 Can I Install More Than One Version of the Same Compiler?

Yes, the compilers and installation process has been designed to allow you to have more than one version of the same compiler installed, and you can easily move between the versions by changing options in MPLAB X IDE; see 3.2.4 How Can I Select Which Compiler I Want to Build With?

Compilers should be installed into a directory whose name is related to the compiler version. This is reflected in the default directory specified by the installer. For example, the 2.40 and 2.20 MPLAB XC8 compilers would typically be placed in separate directories.

C:\Program Files\Microchip\xc8\v2.40\
C:\Program Files\Microchip\xc8\v2.20\