How to stop redis-server autostart

Posted on Jun 7, 2023

Question

I am using Ubuntu to develop my website. Recently, I started to use redis.

When I started my computer, redis-server will start by its own.

What method can I stop my redis-server starting by itself?

Answer

It seems that the redis-server package uses rc.d scripts, and the preferred way to deal with them in Ubuntu is using update-rc.d:

sudo update-rc.d redis-server disable

Should do the trick. You can also disable it in a certain runlevel only:

sudo update-rc.d redis-server disable 2