How to remove redis completely from ubuntu?

What is Redis Server?

Redis is a non-relational database server. Redis is popularly used as a caching server. It supports following data structures:

  • strings
  • hashes
  • lists
  • sets

How to remove redis from ubuntu?

If you have install redis server and want to know how to remove redis server completely from your ubuntu server try following commands one by one:

# if you use apt-get to install redis then use
sudo apt-get purge --auto-remove redis-server

# if you compiled redis manually then follow the
# steps below to remove it completely from linux/ubuntu
sudo service redis_version stop

# Now delete everything related to Redis server from /usr/local/bin/
sudo rm /usr/local/bin/redis-*

# Now delete Redis Configuration files directory and it’s content.
sudo rm -r /etc/redis/

# Delete existing Redis log files.
sudo rm /var/log/redis_*

# Delete existing Redis data directory and it’s content.
sudo rm -r /var/lib/redis/

# Delete existing Redis server init scripts
sudo rm /etc/init.d/redis_*

# Remove existing Redis PID files (Only if exists)
sudo rm /var/run/redis_*​

Resources

Above instructions are taken from following resource:

Grainier Perera