Bug 567919 - package-cleanup creates a temporary directory not removed by "yum clean all"
package-cleanup creates a temporary directory not removed by "yum clean all"
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-24 05:33 EST by Steve Tyler
Modified: 2014-01-21 18:13 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-02-24 12:15:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Tyler 2010-02-24 05:33:15 EST
Description of problem:
package-cleanup creates a temporary directory when run as non-root. This directory is not removed by "yum clean all" and package-cleanup does not have an option to remove it.

Version-Release number of selected component (if applicable):
yum-utils-1.1.26-1.fc13.noarch
yum-3.2.26-4.fc13.noarch

How reproducible:
Always.

Steps to Reproduce:
1. sudo yum clean all
2. sudo rm -r /var/tmp/yum*
3. package-cleanup --orphans # run as non-root
  
Actual results:
[stephent@fir tmp]$ cd /var/tmp
[stephent@fir tmp]$ ls -l
total 4
drwx------ 3 stephent stephent 4096 Feb 24 02:08 yum-stephent-UnzUE5
[stephent@fir tmp]$ du -sh
59M	.

Expected results:
Option to package-cleanup to remove this 59M directory or "yum clean all" removes it.

Additional info:
Discovered this space-consuming directory while trying to make room for updates to an F13 installation on a 3GB disk partition.
Comment 1 James Antill 2010-02-24 08:41:12 EST
Running "yum clean all" as none root will clean that dir.
Comment 2 Steve Tyler 2010-02-24 09:12:46 EST
(In reply to comment #1)
> Running "yum clean all" as none root will clean that dir.    

OK. That's perfect. Thanks.

Reopening as a documentation bug: (not sure how to assign/reassign)

"man yum" does not mention this directory, nor that the behavior depends on whether the command(s) are run as root or not. (The latter is true of many commands, but package-cleanup gives no indication.)
Comment 3 Steve Tyler 2010-02-24 10:08:20 EST
(In reply to comment #2)
> (In reply to comment #1)
> > Running "yum clean all" as none root will clean that dir.    
> 
> OK. That's perfect. Thanks.

On further thought, maybe not so perfect ...

I administer my own system and often do, say:
$ sudo yum update
...
$ package-cleanup --orphans

IIUC, I now have two copies of the repo data -- one in /var/cache/yum and one in /var/tmp.

Further, I now have to remember to run two "yum clean"s:
$ sudo yum clean all
$ yum clean all
Comment 4 James Antill 2010-02-24 12:15:29 EST
tmpwatch should run daily, which will clean up /var/tmp automatically.

You can also do: yum -C list extras ... as a normal user this will output the same info. as "package-cleanup --orphans" and use root's yum cache.
Comment 5 Steve Tyler 2010-02-24 17:02:51 EST
(In reply to comment #4)
> tmpwatch should run daily, which will clean up /var/tmp automatically.

OK. It appears to rm files in /var/tmp older than 30 days in the default config.

> You can also do: yum -C list extras ... as a normal user this will output the
> same info. as "package-cleanup --orphans" and use root's yum cache.    

Thanks. I'll start using this instead, since it refreshes root's yum cache as needed:
$ sudo yum list extras

The other options to package-cleanup don't appear to be a problem.

I still believe the documentation could note that when run as non-root these will create a redundant yum cache in /var/tmp:
$ package-cleanup --orphans
$ yum list extras

Note You need to log in before you can comment on or make changes to this bug.