You are not logged in.

#1 Yesterday 12:45:55

archqt
Member
Registered: 2015-04-29
Posts: 200

sudo pacman -Scc doesn't delete cache [SOLVED]

Hi,
when i do

sudo pacman -Scc

It asked me to delete all cache files, i said yes, it wrote "deleting all files from the cache". But when i look into it, they are still there ??

/etc/pacman.conf has this line

CacheDir    = /pacman/pkg/

Last edited by archqt (Today 06:48:44)

Offline

#2 Yesterday 13:19:18

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,997

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

Define 'they are still there'.

Offline

#3 Yesterday 15:23:31

archqt
Member
Registered: 2015-04-29
Posts: 200

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

Scimmia wrote:

Define 'they are still there'.

Packages are still in the directory. I just tested on another computer where base configuration is applied,  and when i do sudo pacman -Scc, then packages stored in /var/cache/pacman/pkg/ are deleted from directory.
I will test tomorrow on my job computer if same behavior.

Offline

#4 Yesterday 15:28:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,997

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

What packages are still in what directory? Specifics man!

Edit: also, what was the exact output of pacman?

Last edited by Scimmia (Yesterday 15:32:18)

Offline

#5 Yesterday 16:32:46

archqt
Member
Registered: 2015-04-29
Posts: 200

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

Scimmia wrote:

What packages are still in what directory? Specifics man!

Edit: also, what was the exact output of pacman?

When i do an update sudo pacman -Syyu , it download package to make the update. Those packages are stored in the cache, and not needed anymore.

Offline

#6 Yesterday 16:39:41

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,997

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

Yes, I know what pacman's cache is.

Start posting actual information, not your interpretation, or don't bother posting at all. This is going nowhere fast at this point.

Offline

#7 Yesterday 16:48:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,290
Website

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

Please post the full and complete output of each of the following:

find /pacman/pkg/
pacman -Scc
find /pacman/pkg/

Last edited by Trilby (Yesterday 16:48:44)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 Yesterday 21:42:40

mountaintrek
Member
Registered: 2024-02-01
Posts: 30

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

Things to try:

1. Add --verbose to your command to verify directories.
2. Try paccache. It is in the pacman-contrib package.
3. Check "/var/log/pacman.log" and the output of "journalctl -e" (-e = pager-end) for errors.

In a test environment, I changed cachedir in pacman.conf, upgraded and then ran "pacman --verbose -Scc" and all files in the "pacman.conf", "cachedir" directory were deleted.

Offline

#9 Today 00:15:20

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,573

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

archqt wrote:
Scimmia wrote:

Define 'they are still there'.

Packages are still in the directory. I just tested on another computer where base configuration is applied,  and when i do sudo pacman -Scc, then packages stored in /var/cache/pacman/pkg/ are deleted from directory.
I will test tomorrow on my job computer if same behavior.

You wrote

CacheDir    = /pacman/pkg/

So why are you looking at /var/cache/pacman/pkg/ ?

Offline

#10 Today 01:04:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,290
Website

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

@skunktrader, I take it you missed this part:

archqt wrote:

I just tested on another computer...

Though I have no idea why the OP described the process working just as expected.

Last edited by Trilby (Today 01:05:23)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 Today 06:46:57

archqt
Member
Registered: 2015-04-29
Posts: 200

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

If i remove the CacheDir    = /pacman/pkg/ in pacman.conf it works fine
If i change CacheDir    = /pacman/pkg/ to CacheDir    = /home/archqt/pacman/pkg/ then it works fine

It need full path for the root to work well.
Thanks for the help

Last edited by archqt (Today 06:48:21)

Offline

#12 Today 12:12:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,290
Website

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

archqt wrote:

It need full path for the root to work well.

Yes, this is quite clear in the man page.  But you did give it a full path - I gather that path doesn't actually exist which is the root of all the problems.  I'm not sure how you'd expect it to infer where exactly this incomplete path actually was.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 Today 12:20:43

archqt
Member
Registered: 2015-04-29
Posts: 200

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

Trilby wrote:
archqt wrote:

It need full path for the root to work well.

Yes, this is quite clear in the man page.  But you did give it a full path - I gather that path doesn't actually exist which is the root of all the problems.  I'm not sure how you'd expect it to infer where exactly this incomplete path actually was.

I was on my own account using sudo, so the path /pacman/pkg/ exists, started from the home.
And when the path doesn't exist, it write an error and create it, but here none of this, no error, nothing written on log and it download the file somewhere and delete them after.

But if it was written in the man, i missed it.
Thanks for the replies.

Offline

#14 Today 12:37:23

seth
Member
Registered: 2012-09-03
Posts: 57,665

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

I was on my own account using sudo, so the path /pacman/pkg/ exists, started from the home.

That is not a thing.
/pacman/pkg/ is an absolute path, regardless of your $PWD (which for a relative path would be more relevant than what account or how many sudo's you're using)

Online

#15 Today 12:47:31

ayekat
Member
Registered: 2011-01-17
Posts: 1,608

Re: sudo pacman -Scc doesn't delete cache [SOLVED]

See also this article or any other Web search result for "relative vs absolute paths".

archqt wrote:

And when the path doesn't exist, it write an error and create it, but here none of this, no error, nothing written on log and it download the file somewhere and delete them after.

There is a warning, though:

$ pacman-conf | grep -E '^CacheDir'
CacheDir = /nonexistent/path/
$ ls -d /nonexistent/path
ls: cannot access '/nonexistent/path': No such file or directory
$ sudo pacman -S {somepackage}
…
:: Proceed with installation? [Y/n]
warning: no /nonexistent/path/ cache exists, creating...
:: Retrieving packages...
…
$ ls -d /nonexistent/path
/nonexistent/path

That being said, if I try to -Scc a non-existent cache, I get this:

$ sudo pacman -Scc

Cache directory: /nonexistent/path/
:: Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...
error: could not access cache directory /nonexistent/path/
…

But since your cache already existed, it ran without errors (and likely you simply checked the wrong directory, which is all we can tell without knowing which directory exactly you checked).


pkgshackscfgblag

Offline

Board footer

Powered by FluxBB