Ariana Grande has apologised to her ex-boyfriend Ricky Alvarez for giving him the ''worst'' line in 'thank u, next'.

The 25-year-old singer name-checked her ex-boyfriends - Pete Davidson, Mac Miller, Big Sean and Ricky - on her new song and joked with her former flame about the line she gave him.

In the track, she sings: ''Wrote some songs about Ricky / Now I listen and laugh.''

And taking to Instagram and responding to Ricky's post, which was a video of him listening to the song, she wrote: ''HAHAHAHAHHAHAHAH IM SORRY U GOT THE WORST LINE. It was meant v lovingly (sic).''

Ariana had previously revealed that Ricky, along with Sean and Pete, had been sent the song to listen to before it was released.

She had shared: ''They heard it before it came out.''

Although the song title sounds like it could throw some shade in the direction of her exes, the lyrics suggest the singer has learned important lessons from her past relationships.

She sings: ''Thought I'd end up with Sean, but it wasn't a match. Wrote some songs about Ricky, now I listen and laugh. Even almost got married, and for Pete I'm so thankful. Wish I could say 'thank you' to Malcolm, cause he was an angel. One taught me love, one taught me patience, and one taught me pain.''

Ariana also insisted she is going to focus on herself after her most recent break-up.

In the new song, she sings: ''I met someone else, we havin' better discussions. I know they say I move on too fast, but this one gon' last 'cause her name is Ari, and I'm so good with that.''