As for how long it will last, it's a bit tricky to give a definitive answer. It depends on various factors like:
* Fuel supply: Hubble's fuel is used for course corrections and maintaining its orbit. Once it runs out, it can't be repositioned and will eventually fall back to Earth.
* Equipment failures: The telescope has undergone several servicing missions over the years, which have replaced and upgraded equipment. Future equipment failures could potentially end its mission.
* Space debris: Collisions with space debris pose a threat to Hubble's longevity.
NASA's current plan is to decommission Hubble around 2030-2040. However, it's possible the telescope could last even longer with additional servicing missions or technological advancements.
It's worth noting that even after Hubble stops functioning, its data will continue to be a valuable resource for astronomers for many years to come.