code: public void removeComponentResource(FacesContext context, UIComponent componentResource, String target) {
  
          final Map<String,Object> attributes = componentResource.getAttributes();
          // look for a target in the component attribute set if arg is not set.
          if (target == null) {
              target = (String) attributes.get("target");
          }
          if (target == null) {
              target = "head";
          }
          List<UIComponent> facetChildren = getComponentResources(context,
                                                                  target,
                                                                  false);
          if (facetChildren != null) {
              facetChildren.remove(componentResource);
          }
  
      }
docs: <p class="changed_added_2_0">Remove argument <code>component</code>,
  which is assumed to represent a resource instance, as a resource
  to this view.  A resource instance is rendered by a resource
  <code>Renderer</code>, as described in the Standard HTML
  RenderKit. </p>
  
  <div class="changed_added_2_0">
  <p>
  The <code>component</code> must be removed using the following algorithm:
  <ul>
  <li>If the <code>target</code> argument is <code>null</code>, look for a <code>target</code>
  attribute on the <code>component</code>.<br>
  If there is no <code>target</code> attribute, set <code>target</code> to be the default value <code>head</code></li>
  <li>Call {@link #getComponentResources} to obtain the child list for the
  given target.</li>
  <li>Remove the <code>component</code> resource from the child list.</li>
  </ul>
  </p>
  </div>
  
  @param context {@link FacesContext} for the current request
  @param componentResource The {@link UIComponent} representing a
  {@link javax.faces.application.Resource} instance
  @param target The name of the facet for which the {@link UIComponent} will be added
  
  @since 2.0