Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Re: Yet Another Cleaner - v3 (yacleaner-0.3) UPDATED AGAIN!

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
132 posts
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
Author
Message
tacvbo
n00b
n00b
User avatar
Posts: 39
Joined: Wed May 28, 2003 5:36 pm
Location: México City
Contact:
Contact tacvbo
Website

Re: Yet Another Cleaner - v3 (yacleaner-0.3) UPDATED AGAIN!

  • Quote

Post by tacvbo » Sat May 14, 2005 9:22 am

Wiiiii!!! Another unsupported and unoffical Gentoo cleaner...

...but, with new features!: :D
  • * Clean old distfiles in the $DISTDIR directory (/usr/portage/distfiles)
    * Clean old binary packages files in $PKGDIR directory (/usr/portage/packages)
    * Clean old dirs and files in $WORKDIR directory (/var/tmp/portage)
    * Clean old portage's log files in $PORT_LOGDIR (/var/log/portage)
Grab it here: yacleaner-0.3.3 and please post your comments, patches and suggestions. :-)

Yacleaner Repository: http://blog.tacvbo.net/data/files/yacleaner/
Yacleaner Mirror: http://gentoo.org.mx/yacleaner/

Code: Select all


$ ./yacleaner-0.3.3 --help

Usage:
    yacleaner-0.3.3 [ options ] [ action ] < dist | binpkg | worktmp | log | all >
    yacleaner-0.3.3 --help

Options: [ --ask | --nocolor | --pretend | --verbose ]

Actions:  [ --delete ] [ --move=<dir> ]


Help (this screen):
       --help (-h short option)
              Displays this help

Actions:
       --delete (-d short option)
              Deletes the old files. This is the default action.

       --move=<dir> (-d short option)
              Moves the old files to the selected directory.

Options:
       --ask (-a short option)
              Before performing the clean, display what files will be deleted,
              in the same format as when using --pretend; then ask whether to
              continue with the clean or abort.

       --nocolor (-C short option)
              Make sure none of the output from yacleaner contains color.

       --pretend (-p short option)
              Instead of actually performing the clean, simply display what
              files *would* have been deleted if --pretend weren't used.

       --verbose (-v short option)
              Tell yacleaner-0.3.3 to run in verbose mode. Shows the list of files to
              delete.

       --version (-V short option)
              Displays the version of yacleaner.

Arguments:
       dist
              Remove old dist files on /usr/portage/distfiles

       binpkg
              Remove old binary files on /usr/portage/packages

       worktmp
              Remove old temporary files on /var/tmp/portage

       log
              Remove old log files on /var/log/portage

       all
              Remove old files on /usr/portage/distfiles,
              /usr/portage/packages, /var/tmp/portage,
              and /var/log/portage
* You don't need to be root in order to run the script, it will ask for the password:

Code: Select all

$ ./yacleaner-0.3 all

These are the old files that I would delete:

  [ worktmp ]            7045 K
  [ log ]                5385 K
  [ dist ]               78872 K
  [ binpkg ]             2408 K

  [ total ]              91 M

>>> Waiting 5 seconds before starting...
>>> (Control-C + Enter to abort)...
>>> Cleaning in 1 2 3 4 5

>>> Deleting old files...

Please enter your root Password:

* /var/tmp/portage cleaned.
* /var/log/portage cleaned.
* /usr/portage/distfiles cleaned.
* /usr/portage/packages cleaned.
* The verbose mode will show you wich files are going to be deleted:

Code: Select all

$ ./yacleaner-0.3 --verbose --ask all

These are the old files that I would delete:

  [ worktmp ]   typespeed-0.4.4-r1  297K
  [ log ]       5498-typespeed-0.4.4-r1.log  8.0K
  [ log ]       5499-typespeed-0.4.4-r1.log  4.0K
  [ dist ]      linux-2.6.10.tar.bz2  36M
  [ dist ]      linux-2.6.9.tar.bz2  36M
  [ binpkg ]    All/sandbox-1.2.8.tbz2  132K
  [ binpkg ]    All/sandbox-1.2.9.tbz2  132K
  [ binpkg ]    sys-apps/sandbox-1.2.8.tbz2  0
  [ binpkg ]    sys-apps/sandbox-1.2.9.tbz2  0

  [ total ]              71 M

Do you want me to delete these old files? [Yes/No]
Grab it here: yacleaner-0.3.3 and please post your comments, patches and suggestions. :-)
Last edited by tacvbo on Wed Jan 18, 2006 7:50 am, edited 8 times in total.
Top
gwolf
Guru
Guru
User avatar
Posts: 374
Joined: Thu May 05, 2005 9:07 am
Location: Estonia

  • Quote

Post by gwolf » Sat May 14, 2005 9:35 am

Just tried it out and seems handy. Got rid of 640M old distfiles in 15 secs ;-)
Nice job ;-)

I wish there was something like that for binary packages (in /usr/portage/packages/All), as well.
Top
Maedhros
Bodhisattva
Bodhisattva
User avatar
Posts: 5511
Joined: Wed Apr 14, 2004 8:10 pm
Location: Durham, UK

  • Quote

Post by Maedhros » Sat May 14, 2005 10:55 am

Moved from Portage & Programming.
No-one's more important than the earthworm.
Top
Conditional_Zenith
Apprentice
Apprentice
Posts: 157
Joined: Wed Sep 22, 2004 10:50 am
Location: Australia

  • Quote

Post by Conditional_Zenith » Sun Jun 12, 2005 3:48 am

If you feel like it, I think a feature to ignore certain files you don't want removed would be useful.
Top
StringCheesian
l33t
l33t
Posts: 887
Joined: Tue Oct 21, 2003 6:21 am

  • Quote

Post by StringCheesian » Sun Jun 12, 2005 4:47 pm

Firefox wrote:The connection was refused when attempting to contact blog.tacvbo.net.
Top
Pseud
Apprentice
Apprentice
Posts: 273
Joined: Fri Mar 19, 2004 9:58 pm
Location: Bangalore, India

  • Quote

Post by Pseud » Wed Jun 15, 2005 8:50 am

Very useful; Just now cleared ~0.5GB in no time! Thanks!!
eschew obfuscation
Top
Sorcerer'sApprentice
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 121
Joined: Sat Jan 15, 2005 9:03 am
Location: Jesus College, Cambridge, England

  • Quote

Post by Sorcerer'sApprentice » Wed Jun 15, 2005 9:09 am

gwolf: The eclean script can clean both distfiles and packages.
"One of the major problems encountered in time travel is not that of accidentally becoming your own father or mother ... The major problem is quite simply one of grammar..."

Douglas Adams
Top
russianpirate
Veteran
Veteran
User avatar
Posts: 1167
Joined: Sun Sep 26, 2004 2:47 am
Location: Detroit, MI

  • Quote

Post by russianpirate » Wed Jun 15, 2005 9:51 am

Whats the point of this script really?
rm /usr/portage/distfiles/* & rm -fdR /usr/portage/packages/*

Nice use of colors and looks good though!
Maybe add some more features, it would be cool!
Top
Sorcerer'sApprentice
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 121
Joined: Sat Jan 15, 2005 9:03 am
Location: Jesus College, Cambridge, England

  • Quote

Post by Sorcerer'sApprentice » Wed Jun 15, 2005 1:43 pm

As far as I can tell, this script does not delete the distfiles for installed packages. Say there is a new revision of a large package, such a xorg, which only requires that another patch is downloaded. If you do rm /usr/portage/distfiles/* you will have to download the whole source again, which is a pain on slower connections.
"One of the major problems encountered in time travel is not that of accidentally becoming your own father or mother ... The major problem is quite simply one of grammar..."

Douglas Adams
Top
russianpirate
Veteran
Veteran
User avatar
Posts: 1167
Joined: Sun Sep 26, 2004 2:47 am
Location: Detroit, MI

  • Quote

Post by russianpirate » Wed Jun 15, 2005 5:29 pm

I think this should be implemented into emerge, when you emerge -C [package] all [package]-version's distfiles are removed. That would save a lot of space, and keep the packages that might be revised. However, I usually delete all my distfiles.
Top
tacvbo
n00b
n00b
User avatar
Posts: 39
Joined: Wed May 28, 2003 5:36 pm
Location: México City
Contact:
Contact tacvbo
Website

  • Quote

Post by tacvbo » Wed Jul 06, 2005 9:15 pm

New version released! :D

Thanks for all your comments and suggestions.
gwolf wrote:I wish there was something like that for binary packages (in /usr/portage/packages/All), as well.
russianpirate wrote:Maybe add some more features, it would be cool!
Sorcerer'sApprentice wrote:gwolf: The eclean script can clean both distfiles and packages.
Check the new version of Yet Another Cleaner which can delete old dist and binpkg files, and also can clean temporary directories like /var/tmp/portage and /var/log/portage. :o
gwolf wrote:Just tried it out and seems handy. Got rid of 640M old distfiles in 15 secs ;-)
Nice job ;-)
russianpirate wrote:Nice use of colors and looks good though!
Pseud wrote:Very useful; Just now cleared ~0.5GB in no time! Thanks!!
Thanks to all!! :)
StringCheesian wrote:
Firefox wrote:The connection was refused when attempting to contact blog.tacvbo.net.
Sorry, fixed now, thanks.
Top
radfoj
Guru
Guru
User avatar
Posts: 490
Joined: Fri Dec 31, 2004 12:02 pm
Location: Tísek, Czech Republic
Contact:
Contact radfoj
Website

  • Quote

Post by radfoj » Wed Jul 06, 2005 11:30 pm

Hi, thanks for it, I am giving it try. I used distclean-0.2.py before so there should be nothing to delete in my disfiles, but:

Code: Select all

# ./yacleaner-0.2 --verbose --ask dist

These are the old dist files that I would delete:

  [ dist ]      svn-src  28M

  [ total ]              27 M

Do you want me to delete these old dist files? [Yes/No]

Code: Select all

# emerge info | grep DIST
DISTDIR="/mnt/mandrake/opt/distfiles"

# ls -l /mnt/mandrake/opt/distfiles/svn-src
celkem 0
drwxr-xrwx  5 root root 128 Jun 24 11:29 amarok
svn-src is directory, which was created by emerging unofficial amarok-svn ebuild. Its considered to be deleted becouse amarok-svn is not in my system right now? Dont think so, becouse in cvs-src I have also (among others) directory e17 and also x11-wm/e is not emerged right now.
Top
tacvbo
n00b
n00b
User avatar
Posts: 39
Joined: Wed May 28, 2003 5:36 pm
Location: México City
Contact:
Contact tacvbo
Website

  • Quote

Post by tacvbo » Thu Jul 07, 2005 12:28 am

radfoj wrote:Hi, thanks for it, I am giving it try. I used distclean-0.2.py before so there should be nothing to delete in my disfiles
svn-src is directory, which was created by emerging unofficial amarok-svn ebuild. Its considered to be deleted becouse amarok-svn is not in my system right now? Dont think so, becouse in cvs-src I have also (among others) directory e17 and also x11-wm/e is not emerged right now.
Excelent annotation. Well I will work on cleaning -cvs and -svn distfiles for the next release (v4), also it would be more faster.
Fixed in new version (v3). Also in v2 is fixed. :oops:
Last edited by tacvbo on Fri Jul 08, 2005 12:03 pm, edited 2 times in total.
Top
MAL
n00b
n00b
Posts: 7
Joined: Wed Jan 15, 2003 2:59 pm

  • Quote

Post by MAL » Thu Jul 07, 2005 8:59 am

The SHA-1 checksum for 0.2.1 is invalid

yacleaner-0.2.1.sha1 contains:

45e92d86fa77d2c169160e5279b534150cee6987

but yacleaner-0.2.1 has the following checksum:

57726243730434286d8ef1b5abc976e62980de58


... and I just noticed that 0.2.1 doesn't contain anything new over 0.2, so never mind :)

Thanks for the tool

... ok, further to the confusion ... the sha1 file for 0.2 contains the sha1sum for 0.2.1 !

:)
Top
tacvbo
n00b
n00b
User avatar
Posts: 39
Joined: Wed May 28, 2003 5:36 pm
Location: México City
Contact:
Contact tacvbo
Website

  • Quote

Post by tacvbo » Thu Jul 07, 2005 8:42 pm

MAL wrote:... and I just noticed that 0.2.1 doesn't contain anything new over 0.2, so never mind :)
Check the new v3 (yacleaner-0.3) :-)
Last edited by tacvbo on Fri Jul 08, 2005 12:04 pm, edited 1 time in total.
Top
tacvbo
n00b
n00b
User avatar
Posts: 39
Joined: Wed May 28, 2003 5:36 pm
Location: México City
Contact:
Contact tacvbo
Website

Version 0.3 "Release early and often" is out!

  • Quote

Post by tacvbo » Fri Jul 08, 2005 11:51 am

ChangeLog

* Now it verify that the directories exist
* Now with xterm title progress hints
* Now just remove old logs and worktmp files rather than clean all the log and tmp dir.
* Show {G,K,M,B}bytes when appropiate
* Internal fixes and rewrites

Grab it here: yacleaner-0.3 and please post your comments, patches and suggestions. :-)
Top
MAL
n00b
n00b
Posts: 7
Joined: Wed Jan 15, 2003 2:59 pm

  • Quote

Post by MAL » Fri Jul 08, 2005 12:16 pm

Works beautifully, even the countdown is now the right way round ;)

It's refreshing not to have to wait for python to load each time, just to do a simple task.

Only one thing to point out: you report the actual file size, not the space used on disk. Would it not be better to show the actual space used? (and thus saved), or maybe both :)
I noticed this when I tried it just now, and it reported 48 bytes to clean. The file was the cvs-src directory, which is actually using 8192 bytes on my filesystem:

Code: Select all

# stat /usr/portage/distfiles/cvs-src
<snip>
  Size: 48              Blocks: 1          IO Block: 8192   directory
<snip>
Top
redshift
Tux's lil' helper
Tux's lil' helper
Posts: 98
Joined: Wed Nov 26, 2003 8:23 pm
Contact:
Contact redshift
Website

  • Quote

Post by redshift » Fri Jul 08, 2005 7:38 pm

I'd really like to try this out, but it seems the site is down. Are there any mirrors?
Tom
Top
tacvbo
n00b
n00b
User avatar
Posts: 39
Joined: Wed May 28, 2003 5:36 pm
Location: México City
Contact:
Contact tacvbo
Website

  • Quote

Post by tacvbo » Fri Jul 08, 2005 8:54 pm

redshift wrote:I'd really like to try this out, but it seems the site is down. Are there any mirrors?
Sure, right here: http://66.221.73.173/yacleaner and http://blog.tacvbo.net/files/yacleaner
Top
radfoj
Guru
Guru
User avatar
Posts: 490
Joined: Fri Dec 31, 2004 12:02 pm
Location: Tísek, Czech Republic
Contact:
Contact radfoj
Website

  • Quote

Post by radfoj » Fri Jul 08, 2005 9:21 pm

Hi again, its really great that you listen and improve. Thats why I am here and prefer your cleaner above other. So thanks again.

But bad news, about cvs and svn directories. Here is output from both versions:

Code: Select all

# yacleaner-0.2.1 --ask --verbose dist

These are the old dist files that I would delete:

  [ dist ]      fluxbox-0.9.12.tar.bz2  637K
  [ dist ]      htop-0.5.tar.gz  120K

  [ total ]              0 M
# yacleaner-0.3 --ask --verbose dist

These are the old dist files that I would delete:

  [ dist ]              cvs-src  116M
  [ dist ]              fluxbox-0.9.12.tar.bz2  637K
  [ dist ]              htop-0.5.tar.gz  120K
  [ dist ]              svn-src  28M

  [ total ]              +119 M
# ls -l /mnt/mandrake/opt/distfiles/cvs-src/
celkem 2
drwxr-sr-x   5 root portage 120 Apr 17 04:16 e17
drwxr-sr-x   7 root portage 664 Jun 11 16:42 kat
drwxr-sr-x   9 root portage 680 Jul  5 19:29 kazehakase
drwxr-sr-x  11 root portage 904 Jul  5 19:28 krusader_kde3
drwxr-sr-x   7 root portage 328 Jul  1 20:28 linuxdcpp
drwxr-sr-x   9 root portage 896 Jul  6 19:38 sim
v0.2.1 will do, what I need. cvs+svn will stay. But v0.3 want delete everything. But sim, linuxdcpp krusader and kazehakase is still on system. Is it OK? New feature? Am I missing something? Thanks for reply.
Top
tacvbo
n00b
n00b
User avatar
Posts: 39
Joined: Wed May 28, 2003 5:36 pm
Location: México City
Contact:
Contact tacvbo
Website

  • Quote

Post by tacvbo » Fri Jul 08, 2005 9:44 pm

MAL wrote:Works beautifully, even the countdown is now the right way round ;)
:D
Only one thing to point out: you report the actual file size, not the space used on disk.
Hmmm... let me work on that.

Code: Select all

# stat /usr/portage/distfiles/cvs-src
Yugg, cvs-src and svn-src should not be deleted. Please Re-download yacleaner-0.3 or grab yacleaner-0.3.1 :oops:
Top
radfoj
Guru
Guru
User avatar
Posts: 490
Joined: Fri Dec 31, 2004 12:02 pm
Location: Tísek, Czech Republic
Contact:
Contact radfoj
Website

  • Quote

Post by radfoj » Fri Jul 08, 2005 10:28 pm

I updated to v0.3.1 and am happy again. :wink:
tacvbo wrote:Well I will work on cleaning -cvs and -svn distfiles for the next release (v4)
Before you begin work on it:

Is it what most people using cvs versions want? What about people, who love app X-cvs, but due few crashes they will go back to stable for while and cvs-repository will be lost. They have to redownload it after they decide to be on bleeding edge again. :D I still prefer to manage cvs-src myself, as its only few directories. Hope you understand me. Maybe I am alone. What do you (or others) think about it. Thanks.
Top
redshift
Tux's lil' helper
Tux's lil' helper
Posts: 98
Joined: Wed Nov 26, 2003 8:23 pm
Contact:
Contact redshift
Website

  • Quote

Post by redshift » Fri Jul 08, 2005 11:08 pm

tacvbo wrote:Sure, right here: http://66.221.73.173/yacleaner and http://blog.tacvbo.net/files/yacleaner
Heh... not to be a pain, but neither of those are working right now either. Do I just have really bad timing?

edit: Nevermind, just got one of them to work.
Tom
Top
tacvbo
n00b
n00b
User avatar
Posts: 39
Joined: Wed May 28, 2003 5:36 pm
Location: México City
Contact:
Contact tacvbo
Website

  • Quote

Post by tacvbo » Sat Jul 09, 2005 12:20 am

radfoj wrote:I updated to v0.3.1 and am happy again. :wink:
:D Wiii!
radfoj wrote:
tacvbo wrote:Well I will work on cleaning -cvs and -svn distfiles for the next release (v4)
Before you begin work on it:

Is it what most people using cvs versions want? What about people, who love app X-cvs, but due few crashes they will go back to stable for while and cvs-repository will be lost. They have to redownload it after they decide to be on bleeding edge again. :D I still prefer to manage cvs-src myself, as its only few directories. Hope you understand me. Maybe I am alone. What do you (or others) think about it. Thanks.
You are not alone :).
I was thinking on it and your statement is good enough to leave (cvs|svn)-src untouched. If other people thinks different I'm open to suggestions.
Meanwhile, that dirs will be untouched (also because I have no idea how to deal with them).
Thanks for testing and using it! :D
Top
St. Joe
Apprentice
Apprentice
User avatar
Posts: 242
Joined: Wed Apr 13, 2005 9:38 pm
Location: USA

Re: Version 0.3 "Release early and often" is out!

  • Quote

Post by St. Joe » Sat Jul 09, 2005 1:20 am

tacvbo wrote:Grab it here: yacleaner-0.3 and please post your comments, patches and suggestions. :-)
The only comment I have is THANKS!

The new version is commented perfectly, runs very fast, and has intuitive options.
Took about 170 megs off my system. Very nice job, tacvbo.
For every hammer there is a nail.
For every nail there is a thumb.
Top
Post Reply

132 posts
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy