Bug 567919 - package-cleanup creates a temporary directory not removed by "yum clean all"
Summary: package-cleanup creates a temporary directory not removed by "yum clean all"
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-24 10:33 UTC by Steve Tyler
Modified: 2014-01-21 23:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-24 17:15:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Tyler 2010-02-24 10:33:15 UTC
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 13:41:12 UTC
Running "yum clean all" as none root will clean that dir.

Comment 2 Steve Tyler 2010-02-24 14:12:46 UTC
(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 15:08:20 UTC
(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 17:15:29 UTC
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 22:02:51 UTC
(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.