Procedure should be similar to compacting templates:
https://www.qubes-os.org/doc/fedora-template-upgrade-21/#compacting-the-upgraded-template
Inside VM fill unused space on private.img with zeros:
[user@untrusted ~]$ dd if=/dev/zero of=/home/user/zero
[user@untrusted ~]$ rm /home/user/zero
And then copy image in dom0:
[user@dom0 ~]$ qvm-shutdown --wait untrusted
[user@dom0 ~]$ cd /var/lib/qubes/appvms/untrusted/
[user@dom0 ~]$ cp --sparse=always private.img private.img.new
[user@dom0 ~]$ mv private.img.new private.img
But I have just noticed, that after removing big files in appvm, its
private.img has been automagically compacted, without using this
procedure. Tested on R3.2 and fedora23-based appvm.
--
yaqu