You generally need to transfer the securities to another Demat account or use the applicable process for removing them before the existing account can be closed.