how to delete redis from my ubuntu-16.04 server

14,685

If you used apt-get when installing

sudo apt-get purge --auto-remove redis-server

If you used makefile when installing

How to uninstall Redis server from Ubuntu

Share:
14,685
Abdellah Chadidi
Author by

Abdellah Chadidi

Updated on June 08, 2022

Comments

  • Abdellah Chadidi
    Abdellah Chadidi almost 2 years

    When I run sudo systemctl status redis i get this

    ● redis.service - Redis In-Memory Data Store
    Loaded: loaded (/etc/systemd/system/redis.service; enabled; vendor preset: 
    enabled)
    Active: inactive (dead) (Result: exit-code) since Thu 2017-05-11 03:43:43 
    WEST; 
    31min ago
    Main PID: 1553 (code=exited, status=203/EXEC)
    
    May 11 03:43:42 fevrok systemd[1]: redis.service: Control process exited, 
    code=exited status=203
    May 11 03:43:42 fevrok systemd[1]: redis.service: Unit entered failed state.
    May 11 03:43:42 fevrok systemd[1]: redis.service: Failed with result 'exit-code'.
    May 11 03:43:43 fevrok systemd[1]: redis.service: Service hold-off time over, scheduling restart.
    May 11 03:43:43 fevrok systemd[1]: Stopped Redis In-Memory Data Store.
    May 11 03:43:43 fevrok systemd[1]: redis.service: Start request repeated too quickly.
    May 11 03:43:43 fevrok systemd[1]: Failed to start Redis In-Memory Data Store.
    

    and when I run sudo systemctl status redis-server i get this

    ● redis-server.service - Advanced key-value store
    Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
    Active: active (running) since Thu 2017-05-11 03:25:48 WEST; 49min ago
     Docs: http://redis.io/documentation,
           man:redis-server(1)
    Main PID: 1121 (redis-server)
    CGroup: /system.slice/redis-server.service
           └─1121 /usr/bin/redis-server 127.0.0.1:6379
    
    May 11 03:25:48 fevrok systemd[1]: Starting Advanced key-value store...
    May 11 03:25:48 fevrok run-parts[1116]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example
    May 11 03:25:48 fevrok run-parts[1122]: run-parts: executing /etc/redis/redis-server.post-up.d/00_example
    May 11 03:25:48 fevrok systemd[1]: Started Advanced key-value store.
    

    it looks like I'm having 2 redis services in my machine so how can i remove the first one because it's old and not working when I try to start it, maybe because i tried to delete it long time ago so i think i did it worng so the question is: how i can delete this service : /etc/systemd/system/redis.service