def delete_action_files_from_pack(pack_name, entry_point, metadata_file):
    """
    Prepares the path for entry_point file and metadata file of action and
    deletes them from disk.
    """

    pack_base_path = get_pack_base_path(pack_name=pack_name)
    action_entrypoint_file_path = os.path.join(pack_base_path, "actions", entry_point)
    action_metadata_file_path = os.path.join(pack_base_path, metadata_file)

    if os.path.isfile(action_entrypoint_file_path):
        try:
            os.remove(action_entrypoint_file_path)
        except PermissionError:
            LOG.error(
                'No permission to delete the "%s" file',
                action_entrypoint_file_path,
            )
            msg = 'No permission to delete "%s" file from disk' % (
                action_entrypoint_file_path
            )
            raise PermissionError(msg)
        except Exception as e:
            LOG.error(
                'Unable to delete "%s" file. Exception was "%s"',
                action_entrypoint_file_path,
                e,
            )
            msg = (
                'The action file "%s" could not be removed from disk, please '
                "check the logs or ask your StackStorm administrator to check "
                "and delete the actions files manually" % (action_entrypoint_file_path)
            )
            raise ResourceDiskFilesRemovalError(msg)
    else:
        LOG.warning(
            'The action entry point file "%s" does not exists on disk.',
            action_entrypoint_file_path,
        )

    if os.path.isfile(action_metadata_file_path):
        try:
            os.remove(action_metadata_file_path)
        except PermissionError:
            LOG.error(
                'No permission to delete the "%s" file',
                action_metadata_file_path,
            )
            msg = 'No permission to delete "%s" file from disk' % (
                action_metadata_file_path
            )
            raise PermissionError(msg)
        except Exception as e:
            LOG.error(
                'Could not delete "%s" file. Exception was "%s"',
                action_metadata_file_path,
                e,
            )
            msg = (
                'The action file "%s" could not be removed from disk, please '
                "check the logs or ask your StackStorm administrator to check "
                "and delete the actions files manually" % (action_metadata_file_path)
            )
            raise ResourceDiskFilesRemovalError(msg)
    else:
        LOG.warning(
            'The action metadata file "%s" does not exists on disk.',
            action_metadata_file_path,
        )

    Prepares the path for entry_point file and metadata file of action and
    deletes them from disk.
    
st2common/st2common/services/packs.py