When users delete their accounts, what should you do with their stuff?

I see a few approaches:

1. Recursively delete all their stuff

This causes problems. We run competitions, and if someone deletes their account and we delete their entry to a competition, it disappears from the site possibly in between winning and receiving their prize. If they started a discussion in a forum, all replies would disappear too. It seems like the wrong approach and in testing we've seen things break in this case.

2. Assign their stuff to a "Deleted User" account.

We could make a special user called "Deleted User" who inherits all stranded objects in the system. We have things like awards that can be won though and it seems strange to have them awarded to a deleted user. This approach would seem to prevent application errors since stuff always belongs to a user.

3. Soft-delete users

Maybe keep their username but add a "Deleted" indication next to it. We'd preserve an account as it was but just show people that the user has left our system.

What strategies have you used and would you recommend to handle a user deleting their account?

  • 2
    Just to point out that if you 'soft-delete' an account you must 'real delete' it at some reasonable time, or at least remove anything that could be considered personal information (probably including name). Otherwise you will fall foul of a privacy commissioner and end up in a lot of trouble. Commented Aug 22, 2011 at 21:07
  • See also: Is it a good idea to let your users change their usernames?
    – Rahul
    Commented Aug 23, 2011 at 0:20
  • 2
    I would endorse the comments that you need to ensure that personal information is removed, whatever you do. Exactly what may depend on what they signed up to. But this could be done periodically on all marked users. Commented Aug 23, 2011 at 7:40

6 Answers 6


A soft delete, such as a strike-through in the user name, is the best option for preserving the overall content of the site (like contests and discussions). Deleting some comments out of a thread can make the remaining comments incomprehensible, after all. This option works if it's ok to preserve the fact that such-and-such user once existed in your system.

If it is important for a user to be able to delete the fact that he was there -- i.e., leaving the user name isn't acceptable -- then I recommend a rename that preserves uniqueness. Just renaming everybody "deleted user" causes problems; imagine the case where two or three deleted users participate in the same comment thread. Who's who? Instead, I suggest using number suffixes, so you can tell that deleted-414 is arguing with deleted-761 and that deleted-521 and deleted-71 both entered a contest.

  • This is the approach that Stack Exchange usually takes when someone wants to delete their account. The account is renamed to be anonymous and then deleted. The content remains but there's no way to tie it back to the original poster. Though this isn't personal stuff like you'd have on a social app.
    – ChrisF
    Commented Aug 22, 2011 at 22:06
  • @ChrisF: Out of interest: is the account only renamed, or is its id also changed (and all relations cascade updated)? Otherwise I'd still be able to tell who it was if I had recorded the userid/name combination... Commented Aug 23, 2011 at 8:03
  • @Marjan - it's just the name and yes if you had recorded the user name/id combination elsewhere you would still be able to check. But under normal circumstances the link is broken and if the name is changed to not include the id the then you won't be able to do this either.
    – ChrisF
    Commented Aug 23, 2011 at 8:09
  • @ChrisF: Thanks. But don't understand last sentence. Click on any name (changed or not) and you are taken to a link which contains the id? Or do you mean that the names of deleted users are non-clickable? Just like they are when questions are migrated for contributions by people who do not have an account on the target site? Commented Aug 23, 2011 at 8:15
  • @Marjan - when an account is deleted the name is displayed but it's no longer a link so you can't click it - just like for migrated questions.
    – ChrisF
    Commented Aug 23, 2011 at 8:17

"When users delete their accounts, what should you do with their stuff?"

You should whatever it is you are telling the user you are doing. If I'm on a social media site and there is an option to delete my account, if I choose to do so, I'd expect/want the site to fully delete my account including all content from their DB.

  • 1
    It depends on the license/TOC, but yes in general personal stuff should be deleted along with the user.
    – ChrisF
    Commented Aug 22, 2011 at 22:07
  • 1
    This also depends on the legislation: in Germany for instance, if you don’t offer a user to irrevocably delete their contents, this will land you in a ton of trouble. Commented Aug 23, 2011 at 11:37

If you have users who have required or relevant information attached to them, then the soft-delete approach is almost certainly the best option. Of course it partly depends on why the accounts are deleted, and how unavailable they need to be.

  1. Recursively deleting - because there is information in this heirarchical tree that is probably important - the replies to discussions if not the prize winners - then this is a bad route. Deletion of comments that have prompted responses is normally a poor solution, unless there are legal or ethical reasons for deleting the posting ( which reflects back on why the accounts need to be removed ).

  2. Assigning to Deleted means that in discussion threads, it is no longer clear who started the discussion and who is who if responses are from multiple different deleted users. If the heirarchy is important to retain, then the users must be retained. There are times when having a "default user" is the right solution, to give all details an owner user, but not in this case.

  3. Soft-delete users may just mean not allowing them to be logged into or to post any more information. Again, it depends why you need to remove them. Often, denying login access, and marking with a deleted icon would seem to be the best if this provides the appropriate level of deletion.

  • 1
    I'm a fan of systems that keep content created by deleted users, but use some indication the account is deleted (e.g., LiveJournal strikes-out the username). Otherwise you get a bunch of real-world null pointers... Commented Aug 22, 2011 at 20:40
  • Definately mark as Deleted User - especially in a discussion forum, so that other know they will not get any more responses. And markign the user like this should be straightforward coding wise - no thread searching required. Commented Aug 23, 2011 at 7:37

This is a really tricky question because it hinges so much on the nature of the application, community norms and expectations, and the law. Instead of looking at the problem as one of deletion, I try to look at it as a person exiting a community and how to provide for that.

Do people co-create content with others? Have others interacted with their content in some way, maybe by commenting or producing subsequent versions? If so, removing content initiated by the person exiting isn't so simple if it impacts what others have created.

We also have to consider the autonomy of a person and enabling them to control their public representation through the application. If I don't want to be part of Facebook anymore, then I should have the ability to stop them from saying I am part of it.

Laws can also provide competing advice. In some cases,like Germany cited above, there are laws requiring account removal capability. In other jurisdictions, there may be an obligation to preserve content (and the identity of the person who created it) if there has been some kind of abuse.

The approach I tend to favour, though again each circumstance is different, is to remove the identity of the member but to keep the content where its removal would negatively affect other members. The content might be marked for exclusion from search results, but still there for those who know the URL. You might be surprised at how often this compromise route is taken because a more broad, clear-cut policy just won't work for a given situation.

It's hard to find a clean solution, so I emphasize looking at the norms and expectations of the community. Some will never be happy with anything but full deletion, and you can't change that, but whatever you decide to do should be readily understood by people as they start using the application so they know what they're getting into.


option 1 - as you said creates loopholes in a lot of places, definitely ruled out. data integrity could be a problem as well.

option 3 - sometimes users have their real name as their user name. If the user wants to get out of the system completely, then we should ensure that no data can be linked to them.

option 2 is the best option IMHO. Can't the rewarding system code be tweaked to award the prize to the top 'active' user?


The best scenario from a user's perspective would be go give them the option to do pause their account, which would essentially be a soft delete or the option to completely remove all information.

From a code stand point this is more work but it is a really good experience for the user and lets you hold on to their information longer without infringing on privacy.

  • 1
    Pausing an account is a great feature to provide, and gets you a better chance of re-engaging with the person after the pause. However, it might be a hard sell as a substitute for account deletion. Commented Aug 23, 2011 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.