After hearing the prophecy, Kaṁsa was determined to kill his sister Devakī. To save his wife Devakī, Vasudeva devised a plan and proposed to Kaṁsa that he would bring all the sons to Kaṁsa as soon as they are born. Kaṁsa agreed to it and let them live in their own house.
After the first child was born, Kaṁsa was happy to see the child and let him live. He said that it was only Devakī's eight child who will kill him. So, he had no fear from the first child.
My dear King Parīkṣit, when Kaṁsa saw that Vasudeva, being situated in truthfulness, was completely equipoised in giving him the child, he was very happy. Therefore, with a smiling face, he spoke "O Vasudeva, you may take back your child and go home. I have no fear of your first child. It is the eighth child of you and Devakī I am concerned with because that is the child by whom I am destined to be killed." Śrīmad-Bhāgavatam 10.1.59-60
His mind was changed when Sage Nārada approached him and said that he was a demon Kālanemi and been killed by Viṣṇu in his previous birth. Sage Nārada explain how demoniac person were to be killed. After this he became more cautious and thought anyone in the Yadu dynasty could be Viṣṇu. He then arrested Vasudeva and Devakī and put them in a prison.
After the departure of the great saint Nārada, Kaṁsa thought that all the members of the Yadu dynasty were demigods and that any of the children born from the womb of Devakī might be Viṣṇu. Fearing his death, Kaṁsa arrested Vasudeva and Devakī and chained them with iron shackles. Suspecting each of the children to be Viṣṇu, Kaṁsa killed them one after another because of the prophecy that Viṣṇu would kill him. Śrīmad-Bhāgavatam 10.1.65-66
Kaṁsa killed six sons of Devakī one after the other. Only the first son was named. His name was Kīrtimān. Other sons were not named.
Devakī reminds how Kṛṣṇa and Balarāma retrieved the dead son of their preceptor. She asked that she also wants to see her dead sons. Both of them go to Sutala loka to bring back the dead sons. King Bali duly respects them and worships them. Kṛṣṇa says the purpose of their visit and also explains the previous births of them and why they had to die in the hands of Kaṁsa.
The Supreme Lord said: During the age of the first Manu, the sage Marīci had six sons by his wife Ūrnā. They were all exalted demigods, but once they laughed at Lord Brahmā when they saw him preparing to have sex with his own daughter. 10.85.47
Because of that improper act, they immediately entered a demoniac form of life, and thus they took birth as sons of Hiraṇyakaśipu. The goddess Yoga-māyā then took them away from Hiraṇyakaśipu, and they were born again from Devakī’s womb. After this, O King, Kaṁsa murdered them. Devakī still laments for them, thinking of them as her sons. These same sons of Marīci are now living here with you. Śrīmad-Bhāgavatam 10.85.48-49
We wish to take them from this place to dispel their mother’s sorrow. Then, released from their curse and free from all suffering, they will return to their home in heaven. Śrīmad-Bhāgavatam 10.85.50
By My grace these six — Smara, Udgītha, Pariṣvaṅga, Pataṅga, Kṣudrabhṛt and Ghṛṇī — will return to the abode of pure saints. Śrīmad-Bhāgavatam 10.85.51
The above names were of their previous birth when they were sons of Marīci.
They were still babies when they were brought back to life. Devakī was filled with mother's love. She took them into lap and fed them milk just like she fed to Śrī Kṛṣṇa in the past. After drinking the milk, they took the their original form and went to their original abode.