You are not logged in.
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 (2024-10-23 06:48:44)
Offline
Define 'they are still there'.
Online
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
What packages are still in what directory? Specifics man!
Edit: also, what was the exact output of pacman?
Last edited by Scimmia (2024-10-22 15:32:18)
Online
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
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.
Online
Please post the full and complete output of each of the following:
find /pacman/pkg/
pacman -Scc
find /pacman/pkg/
Last edited by Trilby (2024-10-22 16:48:44)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
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
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
@skunktrader, I take it you missed this part:
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 (2024-10-23 01:05:23)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
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 (2024-10-23 06:48:21)
Offline
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
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
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
See also this article or any other Web search result for "relative vs absolute paths".
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).
Offline