Forrest logo
back to the phar tool

phar:tldr:955a3

phar: Delete the specified file or directory from a Phar file.
$ phar delete -f ${path-to-phar_file} -e ${file_or_directory}
try on your machine

The command phar delete -f ${path-to-phar_file} -e ${file_or_directory} is used to delete files or directories from a Phar archive.

Here's a breakdown of the command:

  • phar: This is the command-line tool used to work with Phar archives in PHP.
  • delete: This is the specific command with the purpose of deleting files or directories from a Phar archive.

Options:

  • -f ${path-to-phar_file}: The -f option is used to specify the path to the Phar archive file from which files will be deleted. ${path-to-phar_file} should be replaced with the actual file path.
  • -e ${file_or_directory}: The -e option is used to specify the file or directory to be deleted from the Phar archive. ${file_or_directory} should be replaced with the actual file or directory path.

By running this command, it will delete the specified file or directory from the Phar archive associated with the provided file path.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the phar tool