---
name: "rpmlua"
section: "1"
platform: "linux"
package: "rpm-tools"
version: "6.0.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/rpmlua"
---

# rpmlua(1)

RPM Lua interpreter

## NAME

rpmlua - RPM Lua interpreter

## SYNOPSIS

**rpmlua** \[options\] \[*LUA\_SCRIPT*\] \[-- *ARG* ...\]

## DESCRIPTION

Run RPM internal Lua interpreter.

Note: indexes start at 1 in Lua, so the program name is at arg\[1\] instead of the more customary index zero.

## ARGUMENTS

*LUA SCRIPT*

A Lua script.

*ARG*

Options and arguments to be passed to *SCRIPT\_FILE*. **rpmlua** stops processing at **--**.

## OPTIONS

- **-i**, **--interactive**

  Run an interactive session after executing optional script or statement.

- **--opts**=*OPTSTRING*

  Perform [**getopt**(3)](/getopt/3.md) option processing on the passed arguments according to *OPTSTRING*.

- **-e** "*STATEMENT*", **--execute** "*STATEMENT*"

  Execute a Lua statement before executing optional script.

## EXIT STATUS

On success, 0 is returned, a nonzero failure code otherwise.

## EXAMPLES

**rpmlua test.lua**

Execute test.lua script file.

**rpmlua --opts=ab:c args.lua -- 1 2 3 -c -b5**

Execute args.lua script file with option processing.

**rpmlua -e "print(rpm.ver('1.0') \< rpm.ver('2.0'))"**

Execute single statement to compare rpm versions.

**rpmlua -i**

Run an interactive session.

## SEE ALSO

[**lua**(1)](/lua/1.md), [**popt**(3)](/popt/3.md), [**getopt**(3)](/getopt/3.md), [**rpm**(8)](/rpm/8.md) [**rpm-lua**(7)](/rpm-lua/7.md)

**http://www.rpm.org/**
