According to;
https://superuser.com/questions/127863/manually-closing-a-port-from-commandline
Only an application can close the sockets it is using, after the applications process is killed, the sockets should be automatically freed within a couple of minutes. Are you being patient enough?