addons:destroy ADDON_NAME [ADDON_NAME ...]

 destroy add-on resources

 -f, --force # allow destruction even if add-on is attached to other apps
340398
def destroy
      if current_command == "addons:remove"
        deprecate("`heroku #{current_command}` has been deprecated. Please use `heroku addons:destroy` instead.")
      end

      raise CommandFailed.new("Missing add-on name") if args.empty?

      requires_preauth
      confirmed_apps = []

      while addon_name = args.shift
        addon = resolve_addon!(addon_name)
        app   = addon['app']

        unless confirmed_apps.include?(app['name'])
          return unless confirm_command(app['name'])
          confirmed_apps << app['name']
        end

        addon_attachments = get_attachments(:resource => addon['id'])

        action("Destroying #{addon['name']} on #{app['name']}") do
          addon = api.request(
            :body     => json_encode({
              "force" => options[:force] || ENV['HEROKU_FORCE'] == '1',
            }),
            :expects  => 200..300,
            :headers  => {
              "Accept" => "application/vnd.heroku+json; version=3",
              "Accept-Expansion" => "plan"
            },
            :method   => :delete,
            :path     => "/apps/#{app['id']}/addons/#{addon['id']}"
          ).body
          @status = "(#{format_price addon['plan']['price']})" if addon['plan'].has_key?('price')
        end

        if addon['config_vars'].any? # litmus test for whether the add-on's attachments have vars
          # For each app that had an attachment, output a message indicating that
          # the app has been restarted any any associated vars have been removed.
          addon_attachments.group_by { |att| att['app']['name'] }.each do |app, attachments|
            names = attachments.map { |att| att['name'] }.join(', ')
            action("Removing vars for #{names} from #{app} and restarting") {
              @status = api.get_release(app, 'current').body['name']
            }
          end
        end
      end
    end
1133799
async def destroy_relation(self, local_relation, remote_relation):
        
        if ':' not in local_relation:
            local_relation = '{}:{}'.format(self.name, local_relation)

        app_facade = client.ApplicationFacade.from_connection(self.connection)

        log.debug(
            'Destroying relation %s <-> %s', local_relation, remote_relation)

        return await app_facade.DestroyRelation([
            local_relation, remote_relation])
647555
def unregisterAddon(cls, name):
        
        prop = '_{0}__addons'.format(cls.__name__)
        cmds = getattr(cls, prop, {})
        cmds.pop(name, None)
785696
def remove_widget widget
     if widget.respond_to? :name and !widget.name.nil?
       @by_name.delete(widget.name)
     end
     @focusable_modified = true
     @widgets.delete widget
   end
245137
def destroy(instances, opts=None):
    '''
    
    '''
    client = _get_client()
    if isinstance(opts, dict):
        client.opts.update(opts)
    info = client.destroy(instances)
    return info
256497
def remove(self, force=False):
        
        if force:
            _fs, filename = opener.parse(self.uri)
            _fs.remove(filename)
        self.uri = None
1110969
def destroy(options={}, &block)
      object = resource
      options[:location] ||= smart_collection_url

      destroy_resource(object)
      respond_with_dual_blocks(object, options, &block)
    end
777468
function() {
								jQuery.each(req.apps, function(idx, item) {
									item.name = item.name || item.appId;
									F2.log('Removed failed ' + item.name + ' app', item);
									F2.AppHandlers.__trigger(
										_sAppHandlerToken,
										F2.Constants.AppHandlers.APP_MANIFEST_REQUEST_FAIL,
										item // the app config
									);
									F2.removeApp(item.instanceId);
								});
							}
813357
def delete(name, force=False):
    '''
    
    '''
    ret = {}

    if name not in list_nictags():
        return True

    cmd = 'nictagadm delete {0}{1}'.format("-f " if force else "", name)
    res = __salt__['cmd.run_all'](cmd)

    if res['retcode'] == 0:
        return True
    else:
        return {'Error': 'failed to delete nictag.' if 'stderr' not in res and res['stderr'] == '' else res['stderr']}
221112
def users_destroy_many(self, external_ids=None, ids=None, **kwargs):
        ""
        api_path = "/api/v2/users/destroy_many.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if external_ids:
            api_query.update({
                "external_ids": external_ids,
            })
        if ids:
            api_query.update({
                "ids": ids,
            })
        return self.call(api_path, query=api_query, method="DELETE", **kwargs)
143918
def remove(addon, dev):
    
    application = get_current_application()
    application.remove(addon, dev=dev)
674008
function destroy() {
         me.pool.push(this.fontScale);
         this.fontScale = undefined;
         me.pool.push(this.fontData);
         this.fontData = undefined;

         this._super(me.Renderable, "destroy");
       }
911073
def remove(self, addon, dev=False):
        """"""
        dependencies = self.get_dependency_manager(dev=dev)
        other_dependencies = self.get_dependency_manager(dev=not dev)
        self.stdout.write(style.format_command('Removing', addon))
        removed = dependencies.remove(addon, warn=False)
        if not removed:
            removed = other_dependencies.remove(addon, warn=False)

        if removed:
            self.build()
        else:
            exception = '%s is not installed.' % Dependency(addon).to_stdout()
            self.stdout.write(style.red(exception))
18539
def destroy(self):
        
        super(AndroidTabLayout, self).destroy()
        if self.tabs:
            del self.tabs
1256672
def destroy_plugin(plugin_name, conn=None):
    
    results = {}
    if plugin_exists(plugin_name, conn=conn):
        results = RPX.table_drop(plugin_name).run(conn)
    return results
541734
def destroy
      @resource = model.find(params[:id])
      authorize @resource

      @resource_title = t(_resource_title.singularize)

      before_destroy_hook(@resource)
      @resource.destroy

      return if _override_views.include? :destroy
      render 'faalis/dashboard/resource/destroy'
    end
179852
def destroy(force = false)
      delete_bucket
      true
    rescue Error::BucketNotEmpty
      if force
        objects.destroy_all
        retry
      else
        raise
      end
    end