How do you delete a knowledgebase?

ccouzi
Giga Contributor

Hi,

We are in the process of decommissioning a particular team from our instance and wanted to delete a Knowledgebase that they created.

I tried assigning myself as the Knowledgebase Owner and I am already an admin, but unable to delete the Knowledgebase. Any tips?

1 ACCEPTED SOLUTION

darius_koohmare
ServiceNow Employee
ServiceNow Employee

Check out this relevant thread: Can you delete an entire Knowledge Base?



Two ways forward:


1. Simply set the KB Active = False, and add a can read user criteria on it to admins only.



2. As admin, run a background script to delete the specific record. Be very cautious when doing this!:


  1. var kbase = new GlideRecord('kb_knowledge_base');  
  2. kbase.addQuery('sys_id', 'SYSID OF KB TO DELETE HERE');   // you can right click the kb record header to copy the sysID
  3. kbase.query();  
  4.  
  5. while (kbase.next()) {  
  6.     kbase.deleteRecord();  
  7. }  

View solution in original post

1 REPLY 1

darius_koohmare
ServiceNow Employee
ServiceNow Employee

Check out this relevant thread: Can you delete an entire Knowledge Base?



Two ways forward:


1. Simply set the KB Active = False, and add a can read user criteria on it to admins only.



2. As admin, run a background script to delete the specific record. Be very cautious when doing this!:


  1. var kbase = new GlideRecord('kb_knowledge_base');  
  2. kbase.addQuery('sys_id', 'SYSID OF KB TO DELETE HERE');   // you can right click the kb record header to copy the sysID
  3. kbase.query();  
  4.  
  5. while (kbase.next()) {  
  6.     kbase.deleteRecord();  
  7. }