a local repository manager


local-repo repo [options]



Specifies the repo you want to work with. This can either be a path to a repo directory or database or a repo name if set up in the config. If it is a path to a directory, this directory can be empty but must exist.


If no option is specified, local-repo will print some general info about the repo.

-a, --add path [path ...]

Add packages to the repo. path can point to a local or remote package file, PKGBUILD tarball, PKGBUILD file or directory containing a PKGBUILD file.

If path points to a package file, local-repo just adds the package to the repo. If path points to a PKGBUILD tarball|file|directory, local-repo tries to make a new package using makepkg and adds it to the repo. Supported tarball extensions are .tar, .tar.gz and .tar.bz2.

If path points to a remote file local-repo tries to download the file before processing it. Supported protocols are HTTP(S) and FTP.

-A, --aur-add package name [package name ...]

Add packages from the AUR. package name must be the name of a package, which is available in the AUR. If everything works fine, local-repo will download, make and add the packages to the repo.

-b, --rebuild package name [package name ...]

Rebuild packages. package name must be the name of a packge, for which a stored PKGBUILD exists. If local-repo can find this stored PKGBUILD, it will try to rebuild the package.

NOTE: To make that feature work, you have to set the pkgbuild option in your config.

-c, --check

Run an integrity check. local-repo checks if all packages listed in the database have a valid checksum, if their signature files exists (if they are marked as signed) and if there are packages in the repo, which are not listed in the database.

-C, --clear-cache

Clear the cache. local-repo will remove the cache file. You should do this, when local-repo behaves strange.

-e, --elephant

The elephant never forgets.

-f, --force

Force an operation. By default you can not add a package, if it is already in the repo. If you want to up- or downgrade a package, you can use this option together with --add or --aur-add.

-F, --config path

Use an alternative config file. By default local-repo tries to load ~/.config/local-repo. Using this option you can override this path.

-h, --help

Print a help message and exit.

-i, --info package name [package name ...]

Print some package info. package name is the name of a package, which is in the repo. local-repo will print everything it knows about it.

-l, --list

List all packages. local-repo will print name and version of every package listed in the database.

-r, --remove package name [package name ...]

Remove packages. local-repo will remove all specified packages from the repo database and delete the package files (and signature files).

-R, --restore

Restore the repo database. Removes the current database and creates a new one by adding all packages available in the repo.

Search the repo. local-repo finds all packages, which have term in their names. The output will be like using --list.

-U, --aur-upgrade

Upgrade all AUR packages. local-repo collects some info from the AUR about all packages and will upgrade them, if there is a new version available.

Packages added to the no-aur-upgrade option in your config will be ignored.

-V, --vcs-upgrade

Upgrade all VCS based packages, which are available in the AUR. local-repo upgrades all packages with a VCS suffix (-git, -cvs, -svn, -hg, -darcs, -bzr) using the latest PKGBUILD from the AUR.

If you just want to upgrade a VCS package without downloading the latest PKGBUILD, you should use --rebuild.


To configure local-repo, create the config file ~/.config/local-repo. Any other place is also possible using the --config switch. Maybe you want to copy the example from /usr/share/local-repo/config.example and edit it. The syntax is pretty common:

# Give your repo a name [reponame] # Set the path to your repo path = /path/to/my/repo # More options option = value

You can choose any free reponame except of all. The [all] section is reserved for global options. path is mandatory, anything else is optional. When you have finished, you can run local-repo reponame [options]. Available options are:


The absolute path to the repo. This is the replacement for the repo argument, so it can point to the repo directory or the repo database. (The database should be preferred, because of performance issues.)


The path to the cache file. This path can either be absolute or relative to path. Default is .cache.


The path to the log file. This path can either be absolute or relative to path. Default is .log.


Path to the PKGBUILD store. This path can either be absolute or relative to path. If this is set, local-repo will store all PKGBUILDs in this directory.


Path to the buidlog store. This path can either be absolute or relative to path. If this path is set, local-repo will store all log files produced by makepkg -L in this directory.


Sign packages. If set to yes, true, 1 or on, local-repo will run makepkg --sign, else makepkg --nosign to build the packages.

NOTE: You need to set up your gpg to use this feature.


Sign the database. If set to yes, true, 1 or on, local-repo will run repo-(add|remove) --verify --sign, to add|remove packages to|from the database.

NOTE: You need to set up your gpg to use this feature.


A space separated list of packages, which will be ignored, when using --aur-upgrade


Uninstall dependencies. If set to yes, true, 1 or on, local-repo uninstalls all previously installed dependencies after adding the package.

This list of supported options is still growing, so you may want to have a look at it from time to time. Here is one working example of a config file:

[all] # Store everything in /path/to/my/repo/.repo log = .repo/log cache = .repo/cache buildlog = .repo/buildlog pkgbuild = .repo/pkgbuild #Sign everything sign = yes signdb = yes [public] path = /srv/http/arch/dow.db.tar.gz no-aur-upgrade = local-repo vim-json [test] path = /tmp/test sign = no signdb = no


mkdir newrepo && local-repo newrepo -A vim-json vim-largefile

These commands will create a new repo and add vim-json and vim-largefile from the AUR to it.

local-repo myrepo -fa http://pkgbuilds.org/oil.tar.gz

This will download, make and add|upgrade a package.

local-repo test -b bash-completion-git

This will upgrade bash-completion-git by rebuilding it.


Please report bugs at:


Please translate local-repo at:

Get it

Get the code from GitHub
git clone git://github.com/ushis/local-repo.git local-repo

Get the PKGBUILD from the AUR

Or just use local-repo
local-repo my-favorite-packages -A local-repo