#!/usr/bin/ruby unless ARGV.grep('--force').any? puts puts "DANGER!" puts puts "Are you sure you want to entirely delete all per-user storage dbs?" puts "Run with --force if you really want to do this." puts "Note: this script will not clean up the `users` db or the `identities` db." puts end require_relative "lib/leap" server = LEAP::Server.new server.databases.each do |db_name| if db_name =~ /^user-[a-f0-9]{32}$/ puts 'destroying %s' % db_name server.database(db_name).delete! end end