.TH WIMLIB-IMAGEX "1" "August 2016" "wimlib 1.10.0" "User Commands" .SH NAME wimlib-imagex-delete \- Delete an image from a WIM archive .SH SYNOPSIS \fBwimlib-imagex delete\fR \fIWIMFILE\fR \fIIMAGE\fR [\fIOPTION\fR...] .SH DESCRIPTION \fBwimlib-imagex delete\fR deletes the specified image from the Windows Imaging (WIM) file \fIWIMFILE\fR. This command is also available as simply \fBwimdelete\fR if the appropriate hard link or batch file has been installed. .PP \fIIMAGE\fR specifies the WIM image in \fIWIMFILE\fR to delete. It may be a 1-based index of an image in the WIM, the name of an image in the WIM, or the keyword "all" to indicate that all images are to be deleted. Use the \fBwimlib-imagex info\fR (1) command to show what images a WIM file contains. .SH NOTES By default, the WIM file is rebuilt with all unnecessary file data removed. This is different from Microsoft's ImageX and DISM, which only will delete the directory tree metadata and XML data for this operation. (See the \fB--soft\fR option for the other kind of delete). .PP Also wimlib allows you to delete all the images from a WIM and have a WIM with 0 images, although such a file wouldn't be very useful. .PP \fBwimlib-imagex delete\fR does not support split WIMs. .SH OPTIONS .TP 6 \fB--check\fR When reading \fIWIMFILE\fR, verify its integrity if the integrity table is present; additionally, when rewriting \fIWIMFILE\fR after the specified image was deleted, always write an integrity table. If this option is not specified, the integrity of \fIWIMFILE\fR will not be checked when it's opened, but an integrity table will be written in the updated WIM if and only if one was present before. .TP 6 \fB--soft\fR Perform a "soft delete". Specifying this flag overrides the default behavior of rebuilding the entire WIM after deleting an image. Instead, only minimal changes to correctly remove the image from the WIM will be taken. In particular, all streams will be left alone, even if they are no longer referenced. This is probably not what you want, because no space will be saved by deleting an image in this way. .IP "" You may use \fBwimlib-imagex optimize\fR to delete unreferenced streams from a WIM that has had images soft-deleted from it. .TP \fB--unsafe-compact\fR Compact the WIM archive in-place, eliminating "holes". In general, this option should \fInot\fR be used because a failed or interrupted compaction will corrupt the WIM archive. For more information, see the documentation for this option in \fBwimlib-imagex-optimize\fR (1). .SH EXAMPLES Delete the first image from 'boot.wim': .RS .PP wimlib-imagex delete boot.wim 1 .RE .PP .SH SEE ALSO .BR wimlib-imagex (1) .BR wimlib-imagex-info (1) .BR wimlib-imagex-optimize (1)