Terminal

How to delete files inside a zip file?

Published on July 21st, 2020


Ever compressed your project directory but forgot to delete that useless file or folder and turns out the compresed file is larger than it's supposed to be?

Here's a quick solution you can try:

If you want to delete a file inside a .zip file, try this:


zip --delete file.zip "file.ext"

And if you want to delete a folder, try this:


zip --delete file.zip "folder/*"

Hope this helps you out!