# Various question about cleaning up an imported vbulletin

**URL:** <https://meta.discourse.org/t/various-question-about-cleaning-up-an-imported-vbulletin/161643>\
**Category:** Product Support\
**Created:** [August 21, 2020, 9:29am UTC](https://meta.discourse.org/t/various-question-about-cleaning-up-an-imported-vbulletin/161643 "2020-08-21T09:29:45Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [August 21, 2020, 9:29am UTC](https://meta.discourse.org/t/various-question-about-cleaning-up-an-imported-vbulletin/161643/1 "2020-08-21T09:29:45Z")

</div>

Hi,  
I imported a 20 years old forum to Discourse.  
It has many unused or spam accounts and spam messages.  
I’d like to do a cleanup.

I set up all my users to trust level 0.  
I tried to know how many users have never posted any message with this [data explorer](https://meta.discourse.org/t/32566?silent=true) query:

```SQL
SELECT COUNT (DISTINCT user_id) from posts

```

It counts 28530.

I tried to know how many total users I have:

```SQL
SELECT COUNT (DISTINCT id) FROM users

```

It counts 180000 (vBulletin stats said we indeed had 180000 accounts)

I triggered the **CleanUpInactiveUsers** Sidekiq job.  
Only a few hundred users were removed. I looked at one of these unused profiles and saw no activity: no post, no topic… However, Discobot sent them a message after I imported all the users from vBulletin. It was 5 days ago.  
So I Discourse settings, I set **clean up inactive users after days** to 1.  
I trigger **CleanUpInactiveUsers** Sidekiq job again.  
I lost about 1000 users.  
I still have 178000 users and I know that most of them are empty and unused profiles with no message.

Any idea why they aren’t removed by CleanUpInactiveUsers?

Plus, since there are many spams accounts and messages. Is it possible to trigger spam detection on existing users and messages, and clean all that up too?

---

_[View the full topic](https://meta.discourse.org/t/various-question-about-cleaning-up-an-imported-vbulletin/161643)._
