Many programming languages have numerous packages available for development purposes in addition to their existing libraries. For example, the R programming language hosts packages on CRAN, similarly the Python programming language hosts packages on PyPI.
My question is simply that I wonder how long these packages will remain available, if they will ever lose functionality or die off and whether they could potentially be stored offline?
Packages on PyPi can indeed be used forever, but there is some nuance that you need to understand.
A package maintainer can add new functionality, change existing functionality or even remove the package completely: the maintainer has total control.
But because we are talking about Python software packages, once you have downloaded a package version (through a package manager such as pip or manually) you have the source in your possession. Note that the software license that applies to a package can legally limit what you are allowed to do with it, so this does not imply ownership of the code.
It is possible to create a mirror repository of the Python Package Index (PyPi), or you can store the packages (and the particular version) you require on storage you control.