Adding script to just close the indices

I wanted to have a way to close indexes in the same manner as we are removing them.