You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cleanup_command.rb
    path of file: ./repos/ruby-packer/ruby/lib/rubygems/commands
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require 'rubygems/command'
require 'rubygems/dependency_list'
require 'rubyge
    
  def execute
    say "Cleaning up installed gems..."

    if options[:args].empty?
      done     = false
      last_set = nil

      until done do
        clean_gems

        this_set = @gems_to_cleanup.map { |spec| spec.full_name }.sort

        done = this_set.empty? || last_set == this_set

        last_set = this_set
      end
    else
      clean_gems
    end