Is there a way to not only find but also delete any .gz files inside a .tar.gz file? I found this link but I wouldn't know how to modify it to make it able to delete found files.


You cannot update compressed tar-files. So as long as you have a tar.gz file there is no way except unpacking, deleting and then repacking.

You could un-gzip the file though. After that there is a --delete-Flag you can use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.