Package Details: pacleaner 2.2-1

Git Clone URL: (read-only, click to copy)
Package Base: pacleaner
Description: Script to clean up pacman cache in a more flexible way than with paccache or pacman itself. Fully configurable and flexible
Upstream URL:
Keywords: cache paccache package pacman
Licenses: GPL
Submitter: None
Maintainer: lesebas
Last Packager: lesebas
Votes: 17
Popularity: 0.077722
First Submitted: 2009-07-09 19:07 (UTC)
Last Updated: 2020-09-16 19:59 (UTC)

Latest Comments

lesebas commented on 2020-05-19 20:40 (UTC)


Probably yay do not re-download the package if it already exists into the temporary directory ~/.cache/yay/pacleaner.

I do not know if there is an option in yay to force to download the package. In any case you can make a :

$rm -Rf ~/.cache/yay/pacleaner


$yay -Sy pacleaner

lpilz commented on 2020-05-19 20:32 (UTC)

That worked, cheers. Even the md5sum check went through without problems...

lesebas commented on 2020-05-19 20:18 (UTC) (edited on 2020-05-19 20:20 (UTC) by lesebas)


Try this :

$ yay -Gf pacleaner

$ cd pacleaner

$ makepkg -ic

lpilz commented on 2020-05-18 20:54 (UTC)

I tried to install it using yay. That's curious indeed. Do you know where I could get some logs?

lesebas commented on 2020-05-18 19:45 (UTC)


That's weird, it works well for me, localy with makepkg or even with yay as AUR helper.

How do you try to install it?

lpilz commented on 2020-05-18 10:28 (UTC)

Pacleaner's newest version won't install for me, since the tar doesn't pass the validity check. Maybe try updating the checksum?

vollekannehoschi commented on 2017-11-18 09:46 (UTC)

> Try to delete and re-install the module with python linked to python3 this fixed it. I had ~/bin/python pointed to python2 instead of python3

mykey commented on 2017-01-07 10:10 (UTC)

Recompile python-hurry-filesize against the latest updates and the error is gone.

lesebas commented on 2016-10-13 08:10 (UTC)

The PKGBUILD of python-hurry use a python script to install the module. Try to delete and re-install the module with python linked to python3 (I'm not sure that the libraries are shared between 2 versions of python).

vollekannehoschi commented on 2016-10-13 06:34 (UTC)

~ > pacman -Q | agi hurry python-hurry-filesize 0.9-3 It seems installed.

lesebas commented on 2016-10-12 20:55 (UTC)

Makepkg Updated for URL issue @vollekannehoschi it seems you did not have install python-hurry-filesize. You can find it in AUR.

vollekannehoschi commented on 2016-10-07 13:19 (UTC)

I get an error when running pacleaner. Normally I linked `python` to python2, so I changed it to python3 for pacleaner, but still get the error: bin > ln -s /usr/bin/python3 python bin > ll python lrwxrwxrwx 1 hoschi users 16 7. Okt 15:16 python -> /usr/bin/python3* bin > sudo pacleaner --help [sudo] Passwort für hoschi: Traceback (most recent call last): File "/usr/bin/pacleaner", line 10, in <module> from hurry.filesize import size ImportError: No module named 'hurry' bin > which python /home/hoschi/bin/python bin > pwd /home/hoschi/bin bin >

saikatbsk commented on 2016-08-26 21:33 (UTC)

Change this line in PKGBUILD, url=( to url="".

neTpK commented on 2016-05-28 07:21 (UTC)

==> ERROR: url should not be an array ==> ERROR: Makepkg was unable to build . ==> Restart building pacleaner ? [y/N]

lesebas commented on 2015-03-18 21:58 (UTC)

New release Pacleaner get paths of pacman DB in pacman.conf Config file become simpler as the script is able to get the pacman database path directly in /etc/pacman.conf. The script support multi-directory for cache (exactly as pacman do). The script indicate also the amount of space free on the disk and the size of each archive to be sweep.

lesebas commented on 2015-03-12 21:23 (UTC)

Updated. No more error possible about package version as built-in function of libalpm (pacman) is used to sort them.

lesebas commented on 2015-03-08 18:30 (UTC)

Hello I've found the solution and will issue a new version of the script soon. This problem concern only the package in the same version with different version of package that overpass 10 or 100, 1000... in your example of xmonad you have the following versions in your cache : 0.11-10 0.11-7 0.11-8 0.11-9 the ten version is sorted first as "pkg version" is considered as string instead of number. No problem in other case.

vollekannehoschi commented on 2015-03-08 17:34 (UTC)

Great! I'm going to test the new version when it is available ;)

lesebas commented on 2015-03-07 18:14 (UTC)

Hello, you're right. This particular case is that always the same version of xmonad and only the "build version change. It keeps the n-1 version instead of n. It's a bug I've to check why.

vollekannehoschi commented on 2015-03-07 17:32 (UTC)

This helped, now pacleaner runs without errors. Another problem I get is that it deletes the wrong (newest) packages. Here is an example, it should not delete the current version, should it? pkg > pacman -Q | acki xmonad xmonad 0.11-10 xmonad-contrib 0.11.3-2 pkg > pacleaner -m | acki xmonad xmonad-contrib-0.11.2-2 xmonad-0.11-10 pkg > ll | acki xmonad -rw-r--r-- 1 root root 722K 28. Dez 23:30 xmonad-0.11-10-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 755K 5. Sep 2013 xmonad-0.11-7-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 723K 27. Apr 2014 xmonad-0.11-8-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 722K 12. Jul 2014 xmonad-0.11-9-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 4,9M 6. Sep 2013 xmonad-contrib-0.11.2-2-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 3,6M 27. Apr 2014 xmonad-contrib-0.11.2-3-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 3,6M 26. Jul 2014 xmonad-contrib-0.11.3-1-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 3,6M 28. Dez 23:45 xmonad-contrib-0.11.3-2-x86_64.pkg.tar.xz

lesebas commented on 2015-03-04 21:04 (UTC)

Ok I've got it, in your cache directory you have some package named hipchat : hipchat-2.2.1221-x86_64.pkg.tar.xz hipchat-2.2.1287-x86_64.pkg.tar.xz hipchat-2.2.1309-x86_64.pkg.tar.xz hipchat-2.2.1328-x86_64.pkg.tar.xz This is not an official archlinux package and the format of file's name is wrong (package release is missing between version number and arch version). To solved your problem delete or move manually these package from /var/cache/pacman/pkg/ I will check to improve the code to ignore wrong format file.

lesebas commented on 2015-03-04 18:31 (UTC)

Do you have python3 installed? Let's continue this thread on github

vollekannehoschi commented on 2015-03-04 18:12 (UTC)

~/.config/pacleaner/pacleaner_config doesn't exist, but here is all other info you requested -> I can translate the german part if you need this.

lesebas commented on 2015-03-04 13:14 (UTC)

@vollekannehoschi Could you check the default pacman path : $ pacman -v and listing the content of the cache : $ ls /var/cache/pacman/pkg/ and the content of the file /usr/share/paclaner/pacleaner_config and ~/.config/pacleaner/pacleaner_config if existing.

vollekannehoschi commented on 2015-03-04 09:04 (UTC)

Current version doesn't work for me :( ~ > pacleaner usage: pacleaner [-h] [--uninstalled] [--morethan] [--delete] [--no-confirm] [--number n] [--cache_path PATH] [--installed_path PATH] pacleaner: error: Need to specify -u, -t or both ~ > pacleaner -u Traceback (most recent call last): File "/usr/bin/pacleaner", line 218, in <module> pkgfiles = PkgFileList(args.cache_path) File "/usr/bin/pacleaner", line 121, in __init__ self.pkg_list.append(PkgFile(f, path)) File "/usr/bin/pacleaner", line 71, in __init__, self.version, self.pkg_version, rest = filename.rsplit('-', 3) ValueError: need more than 3 values to unpack ~ >

lesebas commented on 2015-01-16 12:17 (UTC)

Version 2.0 include delete confirmation, more options and config file to tune the default options : - database Path - cache Path - Number of package to keep in cache - Delete with or without confirmation

lesebas commented on 2015-01-06 21:50 (UTC)

Hello, Script and PKGBUILD updated. Fully compliant with pacman 4.2. Enjoy!

lesebas commented on 2015-01-06 06:39 (UTC)

@connaisseur I will check what I can do... it should not be too much difficult, the script must ignore the file /var/lib/pacman/local/ALPM_DB_VERSION which is not a directory. Unfortunately I don't have a lot of free time right now, I can't promise it soon.

connaisseur commented on 2014-12-30 07:49 (UTC)

Sadly with pacman 4.2.0 this no longer works! Package database changed format. If somebody is able to fix it, this would be verrrrrrry fine!

lesebas commented on 2014-02-09 14:12 (UTC)

I've just update the PKGBUILD. The script is now available from the simple command pacleaner. I think about maintain the script...

stronnag commented on 2012-07-20 16:17 (UTC)

In PKGFILE, should url= not be source= ? Otherwise, the source is not automagically downloaded.

commented on 2012-06-06 20:43 (UTC)

New version is ready. With more options; optional paths, number of packages to keep.

commented on 2012-05-21 10:23 (UTC)

@Neutrino: i was thinking about rewriting the script. Its pretty nasty : / Then i could implement that... or you could do it yourself..

Neutrino commented on 2012-03-07 21:33 (UTC)

this is what I searched for but I have a different path to the cache

commented on 2011-08-15 07:33 (UTC)

This does not delete all files in /var/cache/pacman/pkg, as -Scc does, this will delete the files of installed packages that have more then two files eg: /var/cache/pacman/pkg/xfce-utils-4.6.2-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/xfce-utils-4.6.2-3-x86_64.pkg.tar.xz /var/cache/pacman/pkg/xfce-utils-4.8.1-1-x86_64.pkg.tar.xz /var/cache/pacman/pkg/xfce-utils-4.8.2-1-x86_64.pkg.tar.xz In this example -d cache will delete the two oldest files, xfce-utils-4.6.2-2-x86_64.pkg.tar.xz and 4.6.2-3-x86_64.pkg.tar.xz. This will ensure that you can rollback to the previous version.

commented on 2011-08-15 00:40 (UTC)

wath is the diference from a simple pacman -Scc ????

commented on 2010-10-12 20:47 (UTC)

Sorry for VERY late update. Now it supports the "new" .xz extension.

commented on 2010-05-03 10:41 (UTC)

It does not support the new tar.xz extension.