I have an 86GB SQLite database I am trying to rebuild using VACUUM. The problem is it appears to eventually load the entire database into memory to do this, and I only have 32GB of memory. I am on macOS, and the OS seems to not allow it to swap that much and the disk access is slowed to a few MB per second (down from nearly 1GBps at times during the initial part of the process).
Is there a way to use this command without all of the memory usage?