Finding Unused Spaces or Pages

Still need help?

The Atlassian Community is here for you.

Ask the community

Sometimes, you want to know what is not being used. It's great to know what's getting most attention, but what about stagnant pages, or even entire spaces that are no longer active?

tip/resting Created with Sketch.

If you have Confluence Data Center, you can view detailed analytics for spaces and pages. See Analytics for more information.

If you have Confluence Server, you'll need to query the database directly to find out this information. 

The following query identifies the last date on which content was modified in each space within a single Confluence instance:

SELECT spaces.spacename, MAX(content.lastmoddate)
FROM content, spaces
WHERE content.spaceid = spaces.spaceid
GROUP BY spaces.spacename;

It returns a list of space names, and the last date and time at which any content was added or changed.

Alternatively, this query identifies spaces where the content hasn't changed since a specified date:

SELECT spaces.spacename, spaces.spacekey
FROM content, spaces
WHERE content.spaceid = spaces.spaceid
GROUP BY spaces.spacename, spaces.spacekey
HAVING MAX(content.lastmoddate) < '2006-10-10';

The result is a simple list of space names and corresponding space keys.

Similarly, to identify pages where content hasn't changed since a specified date:

SELECT c.title,
c.creationdate,
c.lastmoddate
FROM content c
WHERE  c.prevver IS NULL
  AND c.contenttype = 'PAGE'
  AND c.content_status = 'current'
GROUP BY c.title, c.creationdate, c.lastmoddate
HAVING MAX(c.lastmoddate) < '2006-10-10';

The result will provide a list of page titles, created date, and last modified date. Change the lastmoddate value as per your needs.

Last modified on Apr 13, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.