Delete topics from forums 

Use administrative commands to remove unwanted or inappropriate topics from the Forums application.

Before you begin

To use administrative commands, use the wsadmin client. See Starting the wsadmin client for details.

About this task

When you remove topics from a forum, the topics are soft-deleted. To remove forum topics from the database completely, you need to purge the forum trash. For more information about purging the trash, see Purging forum trash on a schedule.


To delete forum topics...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./ -jython

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. If you have not yet created a variable that contains the forum topics that you want to delete, create one now. You can get a list of forum topics in hash table format by using one of the ForumsTopicsService fetch commands. For more information about these commands and how to use them, see Retrieve forum content.

      When an employee leaves the organization, for example, and you want to delete all of the forum topics that they created, you can use the following command to identify the forum topics to delete:

      ForumsTopicsService.fetchTopicsCreatedByMember(String extId, String type)

      For example:


      You can also fetch the topics using the employee's member uuid. For example:


  3. Use the following command to delete forum topics:

      ForumsTopicsService.deleteTopics(Vector <forumtopics>)

        Moves the specified forum topics to the trash. Forum topics in the Trash view can be restored as long as they are restored before the trash is emptied.

        Returns a java.util.Vector. Each object in the vector is a java.util.Hashtable that describes a forum topic that could not be deleted. A returned empty vector indicates complete success.

        This command takes the following parameter:


          Vector of hash tables describing the forum topics to be deleted.

        For example:


Parent topic

Manage forum trash

Related tasks

Purging forum trash on a schedule
Purging specific forum content from the trash
Restore deleted forum content