IPURGE(8)

πŸ’– IPURGE(8) β€” Cyrus IMAP documentation πŸ’–

okay bestie, sit down, hydrate, because we're talking about ipurge, the little command that goes through your IMAP mailboxes and deletes stuff based on how old or how big it is. yes, really. it's giving spring cleaning. it's giving digital decluttering era. 🧹✨


✨ NAME ✨

ipurge β€” Cyrus IMAP documentation 🌸

Delete mail from IMAP mailbox or partition based on age or size πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

ipurge [ -f ] [ -C config-file ] [ -x ] [ -M ] [ -X ] [ -i ] [ -s ] [ -o ] [ -n ] [ -v ]
        [ -d days | -b bytes | -k Kbytes | -m Mbytes ]
        [ mailbox-pattern... ]

🌈 DESCRIPTION 🌈

So here's the vibe πŸ’…: ipurge deletes messages from the mailbox(es) you name with Imailbox-pattern β€” and it only nukes the ones that are older or larger than whatever you said with the -d, -b, -k or -m options. like it's literally the bouncer at the club and your old emails did NOT make the list. πŸš«πŸ“§

If you don't give it any mailbox-pattern, ipurge works on all mailboxes. all of them. the whole clique. 😭

Now if the -x option is in the chat, the message age and size MUST match exactly those specified by -d, -b, -k or -m. no vibes-based matching, no "close enough", exact only. ⭐

🚨 bestie listen: there are no default values, and at least one of -d, -b, -k or -m MUST be specified. no cap. don't come for me if you forget. πŸ’€

Okay and here's the part that lowkey matters most πŸ™ˆ: ipurge by default only deletes mail below shared folders, which means mails in mailbox(es) below INBOX.* and user.* stay untouched. they're protected. they're in witness protection. 🫢

Use the option -f to also delete mail in mailbox(es) below these folders. and use the -M option to not recurse into the mailboxes β€” so it stays on the top level only, main character energy but make it shallow. πŸ‘‘

ipurge reads its configuration options out of the imapd.conf(5) file unless you say otherwise with -C. yes queen, config awareness. 🌸


πŸ’… OPTIONS πŸ’…

these are the levers, bestie. pull them carefully.

  • -C config-file β€” Use the specified configuration file config-file rather than the default imapd.conf(5). πŸŽ€
  • -f, --include-user-mailboxes β€” Force ipurge to examine mailboxes below INBOX.* and user.*. going where it normally refuses to go fr fr.
  • -d days, --days= days β€” Age of message in days. πŸ—“οΈ
  • -b bytes, --bytes= bytes β€” Size of message in bytes.
  • -k Kbytes, --kbytes= Kbytes β€” Size of message in Kbytes (2^10 bytes).
  • -m Mbytes, --mbytes= Mbytes β€” Size of message in Mbytes (2^20 bytes).
  • -x, --exact-match β€” Perform an exact match on age or size (instead of older or larger). precision, periodt. ✨
  • -X, --delivery-time β€” Use delivery time instead of Date: header for date matches.
  • -i, --invert-match β€” Invert match logic: -x means not equal, date is for newer, size is for smaller. yes the whole thing flips. icon behavior honestly. πŸ”„
  • -s, --skip-flagged β€” Skip over messages that have the \Flagged flag set. 🚩
  • -o, --only-deleted β€” Only purge messages that have the \Deleted flag set.
  • -n, --dry-run β€” Only print messages that would be deleted (dry run). the responsible bestie option. do this one first, I'm begging. 😭
  • -v, --verbose β€” Enable verbose output/logging. she's chatty and we love that. πŸ—£οΈ

πŸ“ EXAMPLES πŸ“

[NB: Examples needed]

...yeah. that's literally all it says. we're all sitting here waiting for examples like πŸ‘οΈπŸ‘„πŸ‘οΈ. if you write some, you'll be iconic forever.


πŸŽ€ FILES πŸŽ€

  • /etc/imapd.conf

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Systems)


1993–2026, The Cyrus Team


okay that's the whole thing, you ate it, mwah πŸ’– big kiss from Cyrus IMAP version 3.12.3, dated Jul 15, 2026, published as IPURGE(8) β€” go forth and purge responsibly, bestie, and please run the dry run first 🫢✨🧚

πŸ“¦ where this page comes from