I think repository makes more sense than library. A 'repo' is also a large storage of something that is very often indexed and catalogued for easy retrieval as well. It also at least 'feels' more appropriate for something usually remotely accessed, like package manager repos.
Of course, my well has been thoroughly poisoned on this topic, but I generally agree with others that an analogy doesn't and shouldn't have to carry through all the way.