How to remove the core stylesheets from a theme I am developing a Drupal theme and noticed the following CSS files are added automatically by Drupal. I would like to them to be removed. 

&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/ajax-progress.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/align.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/autocomplete-loading.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/fieldgroup.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/container-inline.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/clearfix.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/details.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/hidden.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/item-list.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/js.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/nowrap.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/position-container.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/progress.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/reset-appearance.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/resize.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/sticky-header.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/system-status-counter.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/system-status-report-counters.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/system-status-report-general-info.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/tabledrag.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/tablesort.module.css?owah24" media="all" /&gt;
&lt;link rel="stylesheet" href="/core/themes/stable/css/system/components/tree-child.module.css?owah24" media="all" /&gt;


I have tried two ways to remove it. First one is using libraries-override

libraries-override:
  system/base:
    css:
      component:
        /core/modules/system/css/components/align.module.css: false


The next one is using hook_alter_css

function hook_css_alter(&amp;$css, \Drupal\Core\Asset\AttachedAssetsInterface $assets) {
  unset($css[drupal_get_path('module', 'system') . 'css/components/align.module.css']);
}
Also, you can exclude a whole library at all by adding:

libraries-override:
  system/base: false