I need help deleting entire DataStores. Right now, the tools that Roblox provides are pretty limited, atleast I couldn’t find anything related or good enough to wiping entire DataStores.
My game has a huge list of UserIds which was due to an a free model Admin Commands Script, but I’ve deleted it. Now all that’s left is to delete/wipe the HUGE DataStore containing the UserIds so I don’t have to worry about Right-of-Erasure in the future. The only problem is that I don’t know how to do this reliably.
Right now, I have a script in the game that goes through each key individually and deletes them. This is a VERY, VERY LONG process, which doesn’t work sometimes due to Roblox’s rate limits. I’m tired of deleting every key manually because I also don’t understand how to automate it.
local ds = game:GetService("DataStoreService"):GetOrderedDataStore("MyStore")
local pages = ds:GetSortedAsync(false, 100)
while true do
for _, item in ipairs(pages:GetCurrentPage()) do
ds:RemoveAsync(item.key)
end
if pages.IsFinished then break end
pages:AdvanceToNextPageAsync()
end
This is for something else. I changed it to remove keys. Not tested.
I don’t want to create a new DataStore because I don’t need one anymore. I want to wipe old, unused DataStores efficiently so I don’t have to worry about future Right-Of-Erasure requests and manually deleting the keys.
But regardless of whether I add pauses or not, the loop would be too slow. Looping through 6M+ keys at a pace of 0.05 seconds per key would take a bit over 3 days. Adding pause would slow it down even more.
nothing will happen to you if you ignore those messages they are fully automatic,
you can’t delete a datastore? wow yeah I just looked it up there is no way to delete a datastore that makes no sense (this isn’t sarcasm the fact you can’t delete a datstore is actually stupied)
Hello, Roblox actually has a feature called Data Stores Manager. You can access this via Create, then select your game, look under the “Configure” dropdown and go to data stores manager. Here you can see all data stores and their correlated data. But most importantly you can click the 3 dots on the right of it, and click Mark For Deletion which wipes the data and its key/value without having to go through them manually. I hope this helps!