Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bulk Unwatch pages?

BroadcomS February 6, 2012

Is there any way to bulk unwatch pages in Confluence? With the new autowatch feature, users end up watching potentially hundreds of pages. It's extremely tedious to individually unwatch these pages. How can we remove all watches at once or selectively in bulk?

10 answers

2 accepted

28 votes
Answer accepted
Deleted user October 21, 2014

If you have no access to the DB one could use the browser's JavaScript console

$(function(){
  $('.link-stop-watching').click();
  setTimeout(function(){location.reload();},2000);
});

With this you can at least remove all watches that are shown on the watches page. No fun if you have 110 pages of watches (like me), but better than clicking every "Stop Watching" link by hand laugh

rohit patel February 21, 2019

Hi,

Should we be placing the above code on the parent page??

Regards,

Rohit

Pete Woolley February 21, 2019

Get to the page, open up web inspect (chrome) and paste the code into the Script tab.

Like # people like this
wkjl November 20, 2020

seems to have worked

Terry Campbell February 9, 2021

Worked for me as well, but the Scripts tab no longer exists in the current version of Chrome and is now called Sources.

  1. In Chrome, right-click the page and select Inspect.
  2. At the top select the Source tab.
  3. At the very bottom section, select the Console tab instead of What's New.
  4. In the text field below that, at the bottom to the right of the ">", paste in the code and hit enter.
    • $(function(){
        $('.link-stop-watching').click();
        setTimeout(function(){location.reload();},2000);
      });
  5. All listed watches will switch from Stop Watching to Start Watching, then the page will auto-refresh to display the next page of watches. Note that the number of pages reduced.
  6. Repeat step 4 until all pages that contain watches are removed.

Mind you, it's not a 100% bulk removal, but a bulk removal per page. It's less tedious than unwatching one-by-one. Repeating step 4 is really a matter of hitting the paste shortcut keys, enter and let it refresh, paste shortcut keys, enter and let it refresh, etc.

Like # people like this
StewartHand March 18, 2021

This has saved me 1,000 point and clicks :)

Like efavreau likes this
mukundjalan July 8, 2021

Very useful, saved heck of time!

Michelle Rau good
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2021

This worked beautifully and saved me thousands of clicks. Not just in Confluence, but in email as I dispose of email notifications. Thank you very much!

Annemarie Rom-Weisenbach September 26, 2023

@Terry Campbell Thank you so much for taking the time to enter that workaround! I had 9 pages of watch entries to change so this saved me who knows how many tedious clicks!

Reisinger,Lukas October 10, 2023

Thanks a lot. Saved me loads of time with 183 pages. 

3 votes
Answer accepted
Christian Czaia _Decadis AG_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2012

We were facing the same problem. What we finally did was dropping the entries in the NOTIFICATIONS table in our database. It looked something like this since we only had to drop the notifications of the person who had initially created the Confluence layout.

DELETE FROM NOTIFICATIONS WHERE username = '<user's name>';

After that we experienced a problem that the user the user got an exception when he first tried to view his watches. After watching a random page everything was fine. I don't know if this is the "correct" way but I was looking everywhere before we decided to apply changes directly to the database.

By the way, we globally unchecked the "autowatch" feature:

Workaround

The config lives in an XML file: <confluence install>/confluence/WEB-INF/lib/confluence-x.x.x.jar/preferences-default.xml.

You need to change the boolean value to false, thus:

<preference type="Boolean">
       <name>confluence.prefs.watch.my.own.content</name>
       <value>false</value>
   </preference>

Then place it as <confluence install>/confluence/WEB-INF/classes/preferences-default.xml and restart Confluence.

For more details on modifying jarred config files, please refer to this doc: http://confluence.atlassian.com/display/DOC/Editing+Files+within+JAR+Archives

Hope this works for you

Cheers

Christian

BroadcomS February 13, 2012

Christian,

Thank you for your response and tips. That's what I was afraid of...

Shawn

4 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2014

For all the administrators suffering from this problem, I have written a pair of user macros to fit two use cases:

1. Removing a set of watchers from a set of child pages (and re-adding them, in the case of a temporary change, like moving a bunch of pages).

2. Removing watches for a particular user (or yourself) filtered by space (also with the option to re-add).

You can choose the pages you want from a list of checkboxes, so you can choose as many or as few as you would like.

Note that you must be running an installed version of Confluence (now known as Confluence Server) and have "Remote API" (under General Configuration) enabled.

They should be compatible back to Confluence 4.0, although I haven't been able to test it exhaustively.

You can find the user macros here:

https://bitbucket.org/stephendeutsch/confluence-user-macros/src

Navigate to "bulk remove watchers" and you can find the two macros. "remove watchers" is for use case #1, and "remove watches for user" is for use case #2.

Simply give them a name in the user macro browser (you probably want to select the option "Visible only to system administrators in the Macro Browser"), embed them in a page, and you are all set to go! Using them is pretty self-explanatory.

If you have any questions, you can e-mail me at stephen.deutsch@zanox.com, but I can't offer full support, so please use it at your own risk.

Perhaps this will motivate Atlassian to implement some sort of solution themselves...

3 votes
Paul Miles July 15, 2015

This JavaScript worked for me on Confluence 5.6.6

$(function(){
 $('a.link-stop-watching').click();
 setTimeout(function(){location.reload();},2000);
});
1 vote
Ethan Foulkes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2015
Deleted user February 28, 2018

thanks that is so far the best solution 

William Deshaies June 6, 2018

Working great and it's free! Also, user can do it themselves.

1 vote
Sherif Mansour
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2012

You may also want to watch/comment/vote on this issue to stay updated: https://jira.atlassian.com/browse/CONF-8458

0 votes
Mirko Friedenhagen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2024

A small addendum for the JS snippet:

* I added *space watches* and want to keep these.

* So I use this:

$(function(){
$('table[id="page-watches"]').find('a[class="link-stop-watching"]').click();
setTimeout(function(){location.reload();},2000);
});
0 votes
Gal Caspi February 20, 2019

Do this for each space you want to apply the change:

  • Click "Overview" on the top left
  • Click the watch button (the eye icon on the top right)
  • Uncheck "Watch all content in this space"
0 votes
Neil Arrowsmith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2014

The javascript posted By StAn above didn't work for me on Confluence 4.3. But this did:

$(function(){
$('a.icon.icon-stop-watching').click();
setTimeout(function(){location.reload();},2000);
});

Thanks for the tip!

0 votes
Matin Schiemann November 8, 2013

Hi all, there is a workaround using the free descendant notification plugin of adaptivist, which removes all watches fo a space, see https://marketplace.atlassian.com/plugins/com.adaptavist.confluence.descendentNotification/versions#b302

- Activate watching the page family on root page of a space (will temporarily set you as watcher on all pages of this space)

- Edit page family watches (on the root page or in your personal settings)

- Choose Remove root and all watches on child pages in the page family management page

Don't be too quick in doing this in large spaces. The plugin just does a bulk add or bulk remove on all the pages, which takes a while to finish.

At least that helped me removing my ~ 3800 watches in about 30 minutes.

Good luck.

Matin

P.S.: And don't forget to dump your trashes, might decimate your watchlist too

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events