Bug 252055 - pkg-clean is emptying cache directory
Summary: pkg-clean is emptying cache directory
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-22 19:51 UTC by Usama Khan
Modified: 2021-07-13 08:25 UTC (History)
6 users (show)

See Also:
linimon: maintainer-feedback? (pkg)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Usama Khan 2020-12-22 19:51:42 UTC
"pkg clean" is removing everything from the cache directory.

"pkg clean" (without any option/argument) removes packages that have been superseded by newer versions, and any packages that are no longer provided. Moreover, in order to remove all the packages from the cache, "pkg clean -a" is used. However, it is observed that even without giving an "-a" option, "pkg clean" is deleting all cached packages including those, which have not been superseded by newer versions yet and are still in use.
Comment 1 Wolfgang Hukriede 2021-04-17 19:34:38 UTC
Yes, I can confirm this. "pkg clean -n" also shows the full set.
Comment 2 Trond.Endrestol 2021-07-13 08:25:13 UTC
I created https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249917 some time ago. It's a good thing more people are experiencing this odd behaviour, and hopefully it will be fixed.