The typical way people address this need is to use docker.
@mgruhler wrote:
you could always build from source (the respective package version you need, or even the full distro. The first might work, the latter will give you a lot of headaches)
For future readers: please do not try to build older ROS distributions from source on newer OS than they were released for initially. It can be done, but try to use other approaches first (ie: Docker, LXD, VMs, multi-boot, etc). Building ROS from source is not very difficult, but if you haven't already done it, trying to get older software to build with newer dependencies is not trivial.
Short answer: No
Long answer: you could always build from source (the respective package version you need, or even the full distro. The first might work, the latter will give you a lot of headaches). Or you could fire up a VM with the appropriate distro.
Could you clarify what exactly you want to do and why?