 
   constructor: ->
     @packagePromises = []
-    @availablePackageCache = null
     @apmCache =
       loadOutdated:
         value: null

  isPackageInstalled: (packageName) ->
    if atom.packages.isPackageLoaded(packageName)
      true
    else if packageNames = @getAvailablePackageNames()
      packageNames.indexOf(packageName) > -1
    else
      false

  packageHasSettings: (packageName) ->
    grammars = atom.grammars.getGrammars() ? []

      if code is 0
        @clearOutdatedCache()
        @unload(name)
        @removePackageNameFromDisabledPackages(name)
        callback?()
        @emitPackageEvent 'uninstalled', pack
