    # File lib/chef/knife/cookbook_delete.rb, line 100
          def ask_which_versions_to_delete
            question = "Which version(s) do you want to delete?\n"
            valid_responses = {}
            available_versions.each_with_index do |version, index|
              valid_responses[(index + 1).to_s] = version
              question << "#{index + 1}. #{@cookbook_name} #{version}\n"
            end
            valid_responses[(available_versions.size + 1).to_s] = :all
            question << "#{available_versions.size + 1}. All versions\n\n"
            responses = ask_question(question).split(',').map { |response| response.strip }

            if responses.empty?
              ui.error("No versions specified, exiting")
              exit(1)
            end
            versions = responses.map do |response|
              if version = valid_responses[response]
                version
              else
                ui.error("#{response} is not a valid choice, skipping it")
              end
            end
            versions.compact
          end