Hey, thanks for your feedback.
Good point on the Admin account potentially not being e-mail verified, I’ll add that bit in there.
Lemmy stores a record of users in two places:
local_user
is where local accounts are stored. Each entry has anid
and aperson_id
.person
gets an entry for every user@instance that your Lemmy instance learns about, including users which were created on your instance.local_user
entries are mapped toperson
entries using theperson_id
.local_user
doesn’t actually keep track of user@instance - it’s all stored underperson
and referenced via theperson_id
.
This means that to free up the user names, you would also need to delete the respective entry from person
. There are a few ways you can achieve this:
- You could grab a list of all
person_id
numbers where email_verified=‘f’, then use this list to delete fromperson
. - You could just delete the specific username you want to free up from
person
(where name=‘username’).
Edit: This also explains your confusion around the id of the Admin username - id
would’ve been ‘1’ and that’s the one that matters. person_id
was ‘2’ because your instance likely learnt of another user before the Admin somehow. I just checked mine and person_id
is also 2, so it seems like the standard thing it does.
I didn’t worry about this too much since these were all randomly generated junk usernames that nobody would ever miss and I didn’t think it was worth the extra hassle to try and delete them from person
too, since it would be a bit cumbersome especially if there’s a lot of them.
Anyway, to free up those usernames just delete them from person
using one of the options above.
I hear you on the need to delete junk data, my hope is the devs will eventually include some decent tools for that. It’s a good suggestion, I may put something together when I have a bit of time.
A solution you can try meanwhile is to use an admin account to ‘purge’ the stuff you want to delete - purging does remove everything from the server. Annoyingly you don’t get the option to purge your own posts as the admin, but you can use a second admin account to work around this.
I have a Lenovo ThinkPad T430 that is by now almost 10 years old, it runs perfectly on Linux and is a fantastic choice even today. It’s built like a tank and that Intel i5 powering it is immortal. DDR3 RAM is dirt cheap now and it takes up to 16Gb, you can swap its HDD to a SATA SSD (if not done already) and batteries for it are still cheap and plentiful.
If you’re looking for something affordable for software dev, I can’t think of a better choice for $200-$300
https://www.lenovo.com/lt/lt/laptops/thinkpad/t-series/t430/
They really built this one right, they don’t make them like this anymore.