Da Costa's deal was due to expire in the summer, but he has returned to Portugal five months after his last first-team appearance.
The 23-year old was brought to the club by former boss Dennis Wise from Greek club Ionikis last August.
But he has not figured since being sent off on his first start against Bury in the Johnstone's Paint Trophy in November.