DEV Community

Jakariya Abbas
Jakariya Abbas

Posted on

How to Clean Paru's Local Repository and Stop Removed Packages from Showing Up During Upgrades

If you're using Paru as your AUR helper and have a local repository set up, you might have noticed something odd: even after uninstalling a package, it still shows up when you run paru -Syu.

This happens because the package still exists in your local repository database. Paru thinks it's something you still want to track or upgrade.

In this guide, we’ll walk through how to properly clean up your local repo so Paru stops suggesting updates for packages you've already removed.


Why This Happens

Paru doesn't just check installed packages. If you've built packages into your local repository, it also checks the repository database when deciding what to upgrade.

So even if you uninstall a package, if its metadata is still in the local repo, Paru will include it in upgrade suggestions.


Step 1: Remove the Package from the Local Repo Database

If a package is no longer installed but still being suggested during an upgrade, remove its entry from the local repository database:

paru -Ld <package-name>
Enter fullscreen mode Exit fullscreen mode

For example, if you previously added package-bin:

paru -Ld package-bin
Enter fullscreen mode Exit fullscreen mode

This removes the package entry from the local repo database, but keeps the actual package file on disk.


Step 2: Remove the Package File Too (Optional)

If you want to remove the package file as well (to save space or avoid clutter), use:

paru -Ldd <package-name>
Enter fullscreen mode Exit fullscreen mode

This removes both the database entry and the package file (.pkg.tar.zst).


Step 3: Clean Paru’s Build Cache (Optional)

Over time, Paru’s cache can build up with downloaded and compiled package files. You can clear that cache like this:

paru -Scc
Enter fullscreen mode Exit fullscreen mode

You’ll be asked to confirm—say yes to both prompts if you want to fully clear everything. This helps avoid rebuild issues and keeps things tidy.


(Alternative) Manually Remove the Package from a Repo Database

If you’re managing a local repo manually (outside of Paru), you can use the repo-remove tool:

repo-remove /path/to/localrepo.db.tar.gz <package-name>
Enter fullscreen mode Exit fullscreen mode

Just replace the path with your actual .db.tar.gz repo file.


Quick Summary

What You Want to Do Command
Remove package from local DB paru -Ld package-name
Remove from DB + delete file paru -Ldd package-name
Clear Paru build cache paru -Scc
Manually remove from repo DB repo-remove yourrepo.db package-name

After cleaning things up, run paru -Syu again. You should only see packages that are actually installed and relevant.

Keeping your local repo clean makes managing AUR packages a lot easier—and avoids confusion when you're updating your system.

Top comments (0)