Skip to content

Instantly share code, notes, and snippets.

@dimasch
Last active May 7, 2024 08:29
Show Gist options
  • Star 79 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save dimasch/57b7cee3f7f9d274253d to your computer and use it in GitHub Desktop.
Save dimasch/57b7cee3f7f9d274253d to your computer and use it in GitHub Desktop.
Clear a redis cache in Docker
docker exec -it container-name redis-cli FLUSHALL
@woeterman94
Copy link

Thank you! Lifesaver

@luizjr
Copy link

luizjr commented Sep 10, 2019

Works for me! Thanks!

@tanmay-01
Copy link

Could not connect to Redis at 127.0.0.1:6379: Connection refused

@quangvo09
Copy link

Thank you so much!!

@FaimMedia
Copy link

Works, but also gives me a failed to resize tty, using default size warning.

Better to use -i instead of -it:

docker exec -i container-name redis-cli FLUSHALL

@KonnikPahoni
Copy link

Works, thanks a lot!

@sahmwanga
Copy link

Thank you!

@Aiyom
Copy link

Aiyom commented May 12, 2021

thanks a lot!

@xbral
Copy link

xbral commented Jul 29, 2021

Thanks a lot!!!!

@iwfan
Copy link

iwfan commented Oct 15, 2021

Thank you!

@rserafim
Copy link

tks

@cristhian-net
Copy link

It works, thank you!

@leomenezessz
Copy link

Thank You! ❤️

@kang8
Copy link

kang8 commented Jan 26, 2022

If you want to clear cache from a specific database, you can run:

docker exec -it container-name redis-cli -n database-number flushdb

@N-Ganesh
Copy link

Thank you

@yomguy
Copy link

yomguy commented Jul 25, 2022

👍

@FelipeFinger
Copy link

Thank You! ❤️ ❤️

@giavinh79
Copy link

If password required (otherwise you will get Authentication required error) can just use this:
docker exec -it container-name redis-cli -a password FLUSHALL

@mrkiril
Copy link

mrkiril commented Nov 25, 2022

THNK a lot

@shayangha
Copy link

good

@jose16-21
Copy link

gracias !!

@Natgho
Copy link

Natgho commented Feb 24, 2023

Teşekkürler bro!!

Copy link

ghost commented May 31, 2023

thank you!

@riotsnotdiets
Copy link

Works, thanks! <3

@mcspronko
Copy link

Thanks!

@kamarton
Copy link

kamarton commented Aug 8, 2023

Works, but also gives me a failed to resize tty, using default size warning.

Better to use -i instead of -it:

docker exec -i container-name redis-cli FLUSHALL

-it parameter can be omitted:

docker exec container-name redis-cli FLUSHALL

@jhasudungan
Copy link

Thank You

@legito-dev
Copy link

Thank you!

@RobertoCodeEye
Copy link

it works!!, thank you!!

@gouz7514
Copy link

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment