Closing doors is an important aspect of deliverance from evil spirits. This means that we are removing any entry points that the enemy has in our lives and coming into complete agreement with God. Below is an excerpt from Setting Captives Free that explains this concept further.
Discovering and Closing Any Open Doors
In chapter two, I mentioned that one of the truths about demonic influence is that there are certain things that can open the door to evil spirits. Demons cannot simply go into any person they please; there is normally a point of access that they enter through. An important part of the deliverance process is to close these doors. This will not only greatly aid the process of deliverance; it will also help with long-term freedom and wholeness.
If we want deliverance, we must be willing to break every agreement with the devil and completely align ourselves with God. Closing the doors means that we are taking away every right that the enemy has gained to our lives and shutting every point of access. We position ourselves to resist the devil when we are first submitted to God (see James 4:7).
If a door has been opened through embracing sin, you must come into the light, confess your sin freely, and repent of it totally. There can be no justifying of sin and you must truly want to be free from it.
If you have had any involvement in the occult, there must be a complete renunciation and a willingness to rid yourself of anything related to occult or New Age influence.
If you are harboring bitterness, anger, or unforgiveness toward anybody, you must be willing to forgive those people from your heart.
If generational curses or strongholds are present in your family line, shutting this door could look like looking to the cross and renouncing the sins of previous generations.
If ungodly soul ties have been created through sexual sin or abusive relationships, cut those ties and sever yourself from that relationship.
When closing doors and praying through prayers of deliverance, sincerity in these matters is critical. Deliverance should not be seen as a rote formula to robotically pray through, but a sincere expression of desperation for Jesus to set you free. Both God and the devil know when we are genuine and serious about freedom. Ask the Lord to do the work in your heart and prepare the ground so that there is no hindrance to receiving the freedom that you desire.
Another point about closing doors is that it is often helpful to be as specific as possible. When I lead deliverance prayers for closing doors, I will often start in a general way, but then allow space for people to pray very specifically. Confess sin in general, but then also confess and repent of specific sins that have opened the door. It is not uncommon for a premeditated sinful choice such as adultery, stealing, or abortion, to open a door to unclean spirits. Name things like this that are relevant and agree with God about them. When closing the door of unforgiveness, name the specific people that you are forgiving and release them to God. Renounce any occult activities that you have engaged in, calling them out by name. The point here is to be clear, thorough, and specific when closing the door on the devil.
There have been times in a ministry session where we came to an apparent standstill. Demons were manifesting, but were not seeming to leave when commands were made. At times like this it might be tempting to shout louder and try harder, but I have found that a better approach is to take time to ask the Holy Spirit for direction and revelation about what is going on. In situations like this, there can sometimes be a specific door that needs to be closed. God may reveal it to someone who is ministering or may show the one who is receiving ministry. Once that door is closed, resume the process of driving out the demons.