The Prophet ﷺ said, "Whoever manumits his share o a jointly possessed slave, it is imperative on him to manumit the slave completely if he has sufficient money to pay the rest of its price which is to be estimated justly. He should pay his partners their shares and release him (the freed one). (Using translation from Bukhārī 2503)
أَنَّ النَّبِيَّ ﷺ قَالَ مَنْ أَعْتَقَ شِرْكًا فِي مَمْلُوكٍ فَقَدْ وَجَبَ عَلَيْهِ أَنْ يُعْتِقَ مَا بَقِيَ إِنْ كَانَ لَهُ مِنَ الْمَالِ قَدْرُ ثَمَنِهِ يُقَامُ قِيمَةَ عَدْلٍ فَيُعْطَى شُرَكَاؤُهُ حِصَصَهُمْ وَيُخَلَّى سَبِيلُ الْمُعْتَقِ