When you say “install”, what you really mean is “use” or (more accurately, but not seen in the function call) “bind”. And yes, uniform values are state stored in program objects, so their contents are preserved when those objects are unbound (and later rebound).
Which is (one reason) why they [don’t use](Runtime selection) glUniform/glProgramUniform. Also, it’s why they shouldn’t have been called “subroutine uniforms” to begin with…