Reference

r2pm(1)

Radare2 Package Manager

NAME

r2pm – Radare2 Package Manager

SYNOPSIS

r2pm [-AacdeHhijlpqrRstuUvw] [pkgs...]

DESCRIPTION

The package manager for Radare2, allowing installation, update, uninstallation, and discovery of plugins and tools.

-A

Include packages unsupported by the local platform or build in -s results. Text output marks them as ‘[unsupported]’.

-a repository

Add or delete external repository. Using '-a repository' adds a repository, and '-a -repository' deletes it. Use with no arguments to list all registered repos.

-c pkgname

Clear cached sources for the given package. Use -cp to clean the user plugin directory

-d, doc pkgname

Show documentation and source for given package script

-e pkgname

Edit using $EDITOR the given package script

-f

Force operation. Requires -U, -i or -u

-gi pkg

Global install (system-wide)

-h

Display help message

-H [variable]

List all or selected r2pm environment variables

-i pkgname

Install/update package and its dependencies

-I

Information about the repository and installed packages

-j

JSON output. Requires -l, -s or -v. Search objects include a platforms array of strings and a supported boolean.

-l

List installed packages

-q

Be quiet. Requires an action

-r cmd ...args

Run shell command with R2PM_BINDIR in PATH

-R pkgname

Reload plugin (See R2PM_RELOAD code block package)

-s [keyword]

Search available packages in the database matching a string. By default, filter to packages supported by the local platform and build. Return an error code if no package was found

-t YYYY-MM-DD

Set the package checkout date. Requires an action

-u pkgname

Uninstall package (see -f to force uninstall)

-uci pkgname

Uninstall + clean + install

-ui pkgname

Uninstall + install

-U

Download/initialize or update database (-f for a clean clone)

-UU

Same as -U but upgrade all the installed r2 plugins

-v

Show version

ENVIRONMENT

SUDO

Command to use for system-wide installs (default: sudo)

R2PM_PLUGDIR

Directory for user plugins (default: ~/.local/share/radare2/plugins)

R2PM_BINDIR

Directory for user binaries (default: ~/.local/share/radare2/prefix/bin)

R2PM_MANDIR

Directory for user man pages (default: ~/.local/share/radare2/prefix/man)

R2PM_DOCDIR

Directory for user documentation (default: ~/.local/share/radare2/prefix/doc)

R2PM_OFFLINE

Disable online operations (default: 0)

R2PM_PLATFORM

Override the platform used to filter -s results. Accepted values are r2, unix, windows, qjs, and any; multiple values may be space-separated. Packages with an R2PM_INSTALL_R2() block are portable radare2-command packages; the automatically detected platform always includes r2. The block is executed by radare2 during installation; a matching R2PM_UNINSTALL_R2() block handles uninstallation.

R2PM_DBDIR

Directory for r2pm database (default: ~/.local/share/radare2/r2pm/db)

R2PM_GITDIR

Directory for git repositories (default: ~/.local/share/radare2/r2pm/git)

R2PM_GITSKIP

Skip git pull operations when set

R2PM_TIME

Point in time to use for git checkout (format: YYYY-MM-DD)

R2_LOG_LEVEL

Control verbosity of log messages

R2PM_INCDIR

Directory for include files

R2PM_LIBDIR

Directory for libraries

R2PM_PREFIX

Installation prefix

R2_CFLAGS

Compiler flags to build against radare2 libraries

R2_LDFLAGS

Linker search path flags to build against radare2 libraries

R2_LIBS

Library flags to link against radare2 libraries

EXAMPLES

Install a package

$ r2pm -i yara3

Clean cache and then install (don't git pull on $R2PM_GITDIR/yara3)

$ r2pm -ci yara3

Avoid init/update calls (don't git pull on $R2PM_DBDIR)

$ R2PM_OFFLINE=1 r2pm -i yara

Uninstall a package

$ r2pm -u yara3

Force uninstall a package

$ r2pm -fu yara3

Search a package

$ r2pm -s yara

Search all packages, including unsupported ones

$ r2pm -As

List installed packages

$ r2pm -l

Update database and upgrade all installed packages

$ r2pm -UU

SEE ALSO

radare2(1)

AUTHORS

Written by pancake <[email protected]>.