You probably already tried to convince the man to leave your territory. But it has not produced any results. Now I have to use heavy artillery to resort to psychological pressure. This can be done in different ways.
Completely ignore it. Don't answer his questions, do not speak, only care about themselves and their things, not to cook his food. Not superfluous will be regularly invited to the apartment of friends or relatives. But only ask them also not to pay attention on her ex-husband.
This is a passive option, and it may not yield any result, especially if the spouse has nowhere to go. Start to be more active. Arrange scandals and quarrels, regularly tell him that he left your apartment. If the former does not have a violent temper, it is possible to resort to petty mischief. For example, add it into his food a lot of salt, put a grease stain on your favorite shirt, pour glue in his shoes. But do not behave too aggressive. If you'll be cut to shreds all of his clothes, a big scandal can not be avoided.
If you have a man, ask him to talk to your ex. But this is possible only if they both have a calm character. It is not necessary to invite your partner, if the relationship you have just tied, you can push him away.
Can take really drastic measures. Assemble his things, and set into the hallway. Change the locks to an ex-husband will not be able to get to the apartment. If he tries to break the door, call the police. To contact the law enforcement authorities is possible without such a good reason. Just come and write a statement saying that the stranger refuses to leave your apartment. If you will regularly apply, the police would have to be ex-husband educational conversation or even to open a criminal case.