"libsass was deprecated in Hugo v0.153.0"

I have installed hugo v0.168.0-e27a6760c5547237f87d353aebe0580feadb20f4+extended linux/amd64 BuildDate=2026-10-13T16:42:50Z VendorInfo=gohugoio as binary from your GitHub release page.

Now I’m always getting this warning:

WARN deprecated: css.Sass: libsass was deprecated in Hugo v0.153.0 and will be removed in a future release. Use dartsass instead. See https://gohugo.io/functions/css/sass/#dart-sass

I get this warning even in a clean docker container, with no sass packages installed from my side. My site also does not explicitly include libsass.

The linked website could not really help me to resolve this issue.

What am I supposed to do to get rid of this warning?

Thank you!

I’m pretty sure that’s not true.

The short story is that you need to move to Dart Sass (or to plain css built using css.Build)

OK, I tried these steps:

This is the result:

hugo v0.168.0-e27a6760c5547237f87d353aebe0580feadb20f4+extended linux/amd64 BuildDate=2026-10-13T16:42:50Z VendorInfo=gohugoio
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.27.2"
aomedia.googlesource.com/aom="v3.15.2"
code.videolan.org/videolan/dav1d="1.5.4"
github.com/AOMediaCodec/libavif="v1.4.2"
github.com/KaTeX/KaTeX="0.18.4"
github.com/webmproject/libwebp="v1.6.0"
github.com/sass/libsass="3.6.6"

To me it looks like the extended hugo package from github already comes with libsass. I don’t see how I could remove it.

OK… Now I see it myself.

I’m using the extended edition because I need to generate webp. But it also brings libsass.

Afair, you don’t need extended for webp any more (since 0.16x, I think)

As of 0.153.0 there’s no need for the extended edition to use webp:

Historically, certain features—specifically WebP encoding and LibSass—required the Hugo Extended binary. However, as of v0.153.0:

WebP encoding is now supported in all Hugo editions.

the bare existence of a feature does not trigger a deprecation warning. Only used features trigger these warnings. A bare hugo env call just lists what’s there but no warning on libsass.

The warning is WARN deprecated: css.Sass: libsass ... which tells us:

  • you (or your theme) is calling css.Sass somewhere and that triggers the warning.
  • the default transpiler is still libsass - for backward compatibility. To switch to dartsass follow css.Sass - transpiler

I would use the standard edition and follow dartsass instructions posted by @bep.

Thank you.

My theme uses {{ $style := resources.Get "sass/main.scss" | toCSS $options }}, and I wasn’t aware that toCSS is using libsass.

I guess I have to port it to {{ $style := resources.Get "sass/main.scss" | css.Build $options }} now.

I doubt that.

  • the input for css.Build is CSS.
  • the input for css.Sass is SASS

unless your theme uses the transpiler on plain css …

The easy go is as already suggested:

  • install Dart Sass
  • configure the transpiler to dartsass (add that to the $options)
    at best the theme offers an option to switch to dartdass

or keep using the extended edition, ignore that warning until the deprecation turns to error. At best the theme gets an update then or even before.

We have done some naming cleanups in recent times, so now toCss is an (old) alias for css.Sass. The default (and drepecated) transpiler is libsass.

You can do:

{{ $options := dict "transpiler" "dartsass" }}
```

But you would then need to have a modern Sass installed locally.