OSX /private/var/vm disk usage

TL;DR see last paragraph.

I googled around for this answer and found nothing, so THEN I read the man page. This felt backward for OSX answers.
My Mac gave me warning that I was almost out of disk space recently. I ran du -kx / | sort -nr | less and noticed the biggest offender with nearly 10% of my disk space was /var/private/vm, so I started digging.
It turns out this is where OSX stores its swap files if it needs them.
OSX dynamically grows its swap files by adding new files, not by resizing an existing file. It starts off with very small files and as it needs a new one it creates a large one until it gets to 1GB file size and then it continues making 1GB swap files. The process dynamic_pager manages this.
In my case the 5GB of swap didn’t seem like that much until you consider that I have a 64GB MacBook Air. That is a large piece of the disk.
I told the dynamic_pager to clean up after itself, if it could, by running this command:

sudo dynamic_pager -L 1073741824