View this package for all Ubuntu releases →
How to install nginx-module-trim in Ubuntu 26.04 (resolute)
Filter that strips whitespace and comments from HTML responses
Install
curl -fsSL https://extras.getpagespeed.com/release-latest.deb -o /tmp/getpagespeed-release.deb sudo apt-get install -y /tmp/getpagespeed-release.deb rm /tmp/getpagespeed-release.deb sudo apt-get update sudo apt-get install -y nginx-module-trim
Free to install; commercial production use requires a subscription. Without one, a small license notice appears on HTML pages after 30 days. For other releases and channels, use the setup wizard.
Description
NGINX filter module that modifies responses by removing unnecessary whitespace and comments from HTML, including inline JavaScript and CSS.
Packages
| Package | Size | Built |
|---|---|---|
| nginx-module-trim_1.30.8+0.1.0-9~gps1+ubuntu2604+stable_amd64 | 13 KiB | 2026-11-24 |
| nginx-module-trim_1.30.8+0.1.0-9~gps1+ubuntu2604+stable_arm64 | 13 KiB | 2026-11-24 |
| nginx-module-trim_1.30.7+0.1.0-9~gps1+ubuntu2604+stable_amd64 | 13 KiB | 2026-11-18 |
| nginx-module-trim_1.30.7+0.1.0-9~gps1+ubuntu2604+stable_arm64 | 13 KiB | 2026-11-18 |