Ask coding questions

← Back to all posts
Is it possible to empty the built in repl.it database of it's data?
c4syner (77)

Title explains itself, but is it possible to do this without manually deleting all the keys. Manually meaning using the del method?

Answered by PattanAhmed (1360) [earned 5 cycles]
View Answer
Commentshotnewtop
PattanAhmed (1360)

@c4syner Hi,
Check this website:-
Click here

By reading that, I came to the conclusion that to delete, use this command:-

curl -XDELETE $REPLIT_DB_URL/<key>

Delete returns status code 204 if the key was deleted or 404 if the key did not exist.

Thanks!

Hope this helps

JosephSanthosh (1189)

Hey! I went tried and searched but I don't think there is a button which can empty your database in repl.it. I don't think you can delete your account either, but you can abandon this one and create a new one! I'm so sorry, I tried my best!

Have a great day and I hope this helped :)

c4syner (77)

@JosephSanthosh No problem. I just create a simple for loop to cycle through the entire database and delete all the keys and subsequent data.

SixBeeps (3514)

I don't think there's one command for clearing all of them. Is there a problem with clearing them out individually?

c4syner (77)

@SixBeeps No, just a bit of a slowdown to my workflow. Problem averted though, just created a function to cycle and clear!