Old html files are not being deleted

14 views
Skip to first unread message

Kyle Monette

unread,
Jul 18, 2026, 12:25:11 PM (11 days ago) Jul 18
to PreTeXt support
Hi all,

I noticed that every time I build a 'book' or 'course' to html, the html files accumulate in the output/XXX directory for each build, where XXX could be 'course', 'web', etc.

For example, 'frontmatter.html' is the most recent file but there are 'frontmatter 2.html', 'frontmatter 3.html', etc versions from prior builds. Similarly, chapter files, section files, etc also accumulate.

There are no errors with the build or deployment, per-se, but this means the projects start taking upwards of 800mb+ on my computer -- not ideal. And, it means that if I delete a page, its html output still resides in /output/web and can be accessed online.

I do not know if changing the levels or chunking options can resolve this or not.

Context: I'm using version 2.44.0 of pretext on a Mac, with the CLI. I downloaded pretext using pipx. Builds and deployments are via the CLI.

Thanks in advance!
Kyle

Oscar Levin

unread,
Jul 18, 2026, 12:31:01 PM (11 days ago) Jul 18
to PreTeXt support
Hi Kyle,

Try `pretext build [target] --clean` to remove the previously built output files (substitute the name of your target for [target], of course).

Oscar.  

Cameron Bishop

unread,
Jul 18, 2026, 3:23:25 PM (11 days ago) Jul 18
to pretext...@googlegroups.com
Kyle-

Hello! I was in the same situation. I believe those files started appearing for me because of iCloud trying to back things up.

The fix I found was to put the project under my local user folder, which is not backed up to iCloud. Assuming you are pushing to somewhere like GitLab or GitHub, you will still have backups that are not just on your computer.

-Cameron


On Jul 18, 2026, at 12:31, Oscar Levin <oscar...@gmail.com> wrote:

Hi Kyle,
--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/466fb36a-28d8-4353-b1b5-2e816f2f7fd0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages