Nokia couldn't get rid of Symbian because those devices accounted for the majority of its revenue. It had Series 30 and Series 40 too but those were on for low margin non-smart phones. Symbian actually let you write apps for it but it was a tedious process and Symbian C++ could never be made more modern without breaking everything currently written, so the learning curve was steep. Nokia would never allow that to happen for financial reasons. It started up Maemo intending it to be a successor to Symbian, but once it showed promise various levels of management jumped on board and drowned it in the same bureaucracy that was drowning Symbian at the time. It never recovered. Mobile networks were desperate to break the Apple/Google stranglehold on the mobile OS ecosystem.
There's an ebook on amazon written by David Wood that describe exactly what it was like to work for Nokia and why it disintegrated. https://www.amazon.co.uk/Smartphones-beyond-Lessons-remarkable-Symbian-ebook/dp/B00NAZTCTW/ref=sr_1_1?s=books&ie=UTF8&qid=1474822683&sr=1-1&keywords=david+wood+nokia+symbian