PurgeCSSPurgeCSS
API Reference
  • English
  • Français
GitHub
API Reference
  • English
  • Français
GitHub
  • PurgeCSS

    • About PurgeCSS
    • Getting Started
    • Configuration
    • Command Line Interface
    • Programmatic API
    • Safelisting
    • Extractors
  • Plugins

    • PostCSS
    • Webpack
    • Rollup
    • Gulp
    • Grunt
    • Gatsby
  • Guides

    • Vue
    • React
    • Angular
    • Next.js
    • Nuxt.js
    • Razzle
    • WordPress
    • Hugo
  • Comparison
  • Common Questions

    • How to use with CSS modules
    • How to use with Ant Design

Home > purgecss > ContentCache > prune

ContentCache.prune() method

Remove the files that are not in the given list, e.g. the files of a previous build that the content globs no longer match

Signature:

prune(filePaths: Iterable<string>): number;

Parameters

Parameter

Type

Description

filePaths

Iterable<string>

paths of the files to keep

Returns:

number

the number of files removed