$ zip --filesync -r /path/to/out.zip /path/to/dir
For example let's say you created a zip file from a directory with the command:
Next you delete some files from the directory and repeat the command to recreate the zip. But that will not recreate the zip, it will only update it, and so the file you deleted from the directory will still be there in the zip.
One way to recreate the zip is to delete the file first. Another, better way is to use the