Is it possible to shrink a VirtualBox dynamic image?
Solution 1:
There is tutorial at VirtualBox forums which has this question,
Q: How can I reduce the size of a dynamic VDI on disk?
There are two approaches to cleaning up and reducing the size of the file system stored on a dynamic VDI. The first is what I call in-place and the second is by doing a file system copy.
This answer addresses the first of these.
One more reference: howto resize / expand a vdi disk (linux guest)