{"schemaVersion":1,"id":"purgecss","name":"PurgeCSS","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/purgecss/","officialUrl":"https://github.com/FullHuman/purgecss","isCatalog":false,"description":"Removes unused CSS rules based on content sources: it helps reduce website style output while preserving required dynamic classes.","tasks":["Reduce CSS output without losing used styles","Add exceptions for dynamic classes and compare styles before and after cleanup"],"categoryIds":["infrastructure","quality"],"subcategoryIds":["infrastructure.developer","quality.review"],"tags":["PurgeCSS","build","Development"],"aliases":["FullHuman/purgecss","purge-css","css-purge"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under MIT.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"MIT for the code; dependencies have separate licenses.","selectionGuide":{"purpose":"Reduce CSS output without losing used styles","chooseWhen":["Reduce CSS output without losing used styles","Add exceptions for dynamic classes and compare styles before and after cleanup"],"considerInstead":[],"requirements":["Set a safelist for dynamically generated classes; check PostCSS processing order for exclusion comments."],"limitations":["Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.","Terms of use: MIT for the code; dependencies have separate licenses.","A CSS optimizer may remove the purgecss ignore comment before PurgeCSS reads it."],"faq":[{"question":"What can you use for free in PurgeCSS?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with PurgeCSS?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for PurgeCSS?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with PurgeCSS?","answer":"Specify content sources containing used CSS classes. Add exceptions for dynamic classes and compare styles before and after cleanup. Add the workflow to scripts or CI with a clear report."},{"question":"Why didn't a purgecss ignore rule work in a production build?","answer":"The documentation warns that cssnano and other processors may remove CSS comments beforehand. Use a preserved important comment such as /*! purgecss ... */ or adjust processing order. Safelist also supports strings and standard, deep, and greedy regular expressions."}],"related":[],"sources":["https://github.com/FullHuman/purgecss","https://raw.githubusercontent.com/FullHuman/purgecss/HEAD/README.md","https://raw.githubusercontent.com/FullHuman/purgecss/HEAD/LICENSE","https://www.open-source-tools.com/","https://purgecss.com/safelisting.html"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Reduce CSS output without losing used styles.","inputs":["A repository, package manifests, and configuration.","A compatible runtime and the target build command."],"steps":["Specify content sources containing used CSS classes.","Add exceptions for dynamic classes and compare styles before and after cleanup.","Add the workflow to scripts or CI with a clear report."],"checks":["A clean copy of the project reproduces the result.","Errors produce a nonzero exit code and clear diagnostics."]},"sources":["https://github.com/FullHuman/purgecss","https://raw.githubusercontent.com/FullHuman/purgecss/HEAD/README.md","https://raw.githubusercontent.com/FullHuman/purgecss/HEAD/LICENSE","https://www.open-source-tools.com/","https://purgecss.com/safelisting.html"],"checkedAt":"2026-10-06","reviewScope":"The purpose, current repository license, and separate terms for code, services, and models have been reviewed. The product was not run, and no security audit was performed.","relatedIds":[],"dataVersion":"cbbe7123b47a5ae80983","type":"Build / code quality tool","kind":"tool","pricingNote":"Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/FullHuman/purgecss","label":"Official source"},{"url":"https://raw.githubusercontent.com/FullHuman/purgecss/HEAD/README.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/FullHuman/purgecss/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"},{"url":"https://purgecss.com/safelisting.html","label":"Official source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}