The HTC One M9 was released on March 25, 2015 on Sprint running with Android 5.0 Lollipop, it was updated to Android 5.1 Lollipop in July and later there was Stagefright update in the month of September 2015.
Although HTC is very late in delivering the software update to their device, it’s good to have the update rather not delivering like many other OEMs. Android version on your device will be updated to 3.41.651.3 from 2.11.651.19.
This software update is available via Over the Air download [OTA] and you have data enabled on your device to download the package or we recommend you to connect to free WiFi nearby. Also check that you have more than 1 GB data free on your device.
How to Update
If you are ready, then go to Settings > About Phone and then tap on ‘System Update‘ and finally hit Check Now. Your phone will be restarted in between to apply the updates and it could easily take 20-30 minutes to complete the process of updating, then the app compatibility checkup.
There is no need to backup data of your device as nothing will happen during this process. Just follow the above instructions and you are ready to taste Marshmallow on your device.