Package cleanup configuration

Witajcie Mam problem.

marcin84@marcin84-81de ~]$ sudo paccache -r
[sudo] hasło użytkownika marcin84:
==> no candidate packages found for pruning
[marcin84@marcin84-81de ~]$ du -sh /var/cache/pacman/pkg/
729M /var/cache/pacman/pkg/
[marcin84@marcin84-81de ~]$ sudo paccache -r
==> no candidate packages found for pruning========> why ? There is 729mb that can be removed ?
[marcin84@marcin84-81de ~]$

Proszę o pomoc

paccache -r

By default the last three versions of a package are kept.

For more info, please see:

https://wiki.archlinux.org/title/Pacman#Cleaning_the_package_cache
https://man.archlinux.org/man/paccache.8

1 Like

So it is normal and I don’t have to worry ? So when it will be for example 7gb the paccache -r command will be executed ???

With?? This post is very confusing to me

I’m from poland Smokey

If you are worried about the amount of space the cache is using maybe reduce it to only hold onto the last 2 or 1 before

I get you are from another country/language group but I could not actually determine by translating what you wanted to do. Sorry

[marcin84@marcin84-81de ~]$ du -sh /var/cache/pacman/pkg/
729M /var/cache/pacman/pkg/ so I have 729M that can be removed.

When I use command : sudo paccache -r i get this ==> no candidate packages found for pruning

but pebcak informed me that By default the last three versions of a package are kept.

so I understand that when cache gets bigger paccache -r command will clean cache and I wont get "no candidate packages found for pruning "

okay now I get it, maybe as I mentioned reduce the ammmount of old packages held onto unless there is a reason to hold onto more - this all really depends on use case I generally keep this as the default settings unless I have a samller stoarzge area - if you need the space I’d continue trying to find out more but if you don’t I would hold onto them as a Just In Case

So it is normal that it shows 729 but paccache -r informs no candidate packages found for pruning I don’t have to worry about it right ?

Pacache will probably be checking against the held packages (I may be wrong but this is how I would read that)

I live on the edge and run pacman -Scc after every update to clean the package cache entirely so it never collects old garbage. I do not suggest you do the same, unless you really wan to. :slight_smile:

1 Like

When you run paccahe -r, "no candidate packages found for pruning " means that there are no more packages left in cache but the the three latest ones.

You could try paccahe -rk2 for example to keep two latest packages and so on.

Please refer to the ArchWiki link I posted before.

1 Like

I used to do this but I only had 128gb sdd I was working with at the time

1 Like

Ok but I know that it ask If I want to remove old repositories ? Is it save to removed them

Should be - cross check with the repo but 99% of the time its fine

I have never experienced a problem with that, but I use Arch and do not have any outside repos in my pacman.conf.

I’ve send you private massage.