Markus Reiter 
							
						 
					 
					
						
						
						
						
							
						
						
							0ab750bf24 
							
						 
					 
					
						
						
							
							Use module_function for commands.  
						
						
						
						
					 
					
						2016-10-02 00:24:47 +02:00 
						 
				 
			
				
					
						
							
							
								Markus Reiter 
							
						 
					 
					
						
						
						
						
							
						
						
							a5b11a6a5c 
							
						 
					 
					
						
						
							
							Fix Style/GuardClause.  
						
						
						
						
					 
					
						2016-09-23 15:30:07 +02:00 
						 
				 
			
				
					
						
							
							
								Max Nordlund 
							
						 
					 
					
						
						
						
						
							
						
						
							fa1fd70a37 
							
						 
					 
					
						
						
							
							Add all the top level comments  
						
						
						
						
					 
					
						2016-04-10 22:59:25 +02:00 
						 
				 
			
				
					
						
							
							
								Baptiste Fontaine 
							
						 
					 
					
						
						
						
						
							
						
						
							9bdd6619e2 
							
						 
					 
					
						
						
							
							cleanup: move code away from cmd/  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#47484 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr> 
					
						2016-01-04 13:17:21 +01:00 
						 
				 
			
				
					
						
							
							
								Rakesh 
							
						 
					 
					
						
						
						
						
							
						
						
							090b133a01 
							
						 
					 
					
						
						
							
							cleanup: display total disk space to be cleared  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#45642 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> 
					
						2015-12-30 08:12:03 +00:00 
						 
				 
			
				
					
						
							
							
								Dominyk Tiller 
							
						 
					 
					
						
						
						
						
							
						
						
							e00216e4e5 
							
						 
					 
					
						
						
							
							cmd/cleanup: cleanup java_cache  
						
						
						
						
					 
					
						2015-12-18 23:32:56 +00:00 
						 
				 
			
				
					
						
							
							
								Corey Prophitt 
							
						 
					 
					
						
						
						
						
							
						
						
							267465ea6f 
							
						 
					 
					
						
						
							
							cleanup: don't warn when skipping pinned formula.  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#46604 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> 
					
						2015-12-04 18:07:11 +00:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							cc8859f86a 
							
						 
					 
					
						
						
							
							cleanup: use installed_prefixes/installed_kegs  
						
						
						
						
					 
					
						2015-11-29 20:24:30 +08:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							ee332c4550 
							
						 
					 
					
						
						
							
							handle TapFormulaWithOldnameAmbiguityError  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#44705 .
Signed-off-by: Xu Cheng <xucheng@me.com> 
					
						2015-10-08 16:02:33 +08:00 
						 
				 
			
				
					
						
							
							
								Forrest Fleming 
							
						 
					 
					
						
						
						
						
							
						
						
							e0f9994542 
							
						 
					 
					
						
						
							
							Remove incomplete files in cache on brew cleanup  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#44182 .
Closes  Homebrew/homebrew#44349 .
Signed-off-by: Xu Cheng <xucheng@me.com> 
					
						2015-10-06 15:13:25 +08:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							a88c40b8c8 
							
						 
					 
					
						
						
							
							core file style update  
						
						
						
						
					 
					
						2015-08-22 13:15:33 +08:00 
						 
				 
			
				
					
						
							
							
								Baptiste Fontaine 
							
						 
					 
					
						
						
						
						
							
						
						
							8ba0fb9fcf 
							
						 
					 
					
						
						
							
							unnecessary calls to .select simplified  
						
						... 
						
						
						
						These are minor perf optimizations.
Closes  Homebrew/homebrew#43028 .
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr> 
						
						
					 
					
						2015-08-18 00:18:22 +02:00 
						 
				 
			
				
					
						
							
							
								Dominyk Tiller 
							
						 
					 
					
						
						
						
						
							
						
						
							63a7f29270 
							
						 
					 
					
						
						
							
							cleanup: require thread  
						
						
						
						
					 
					
						2015-08-16 21:01:52 +01:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							c4df86eb9d 
							
						 
					 
					
						
						
							
							cleanup: speed up rm_DS_Store by multithread  
						
						... 
						
						
						
						Before
```
$ time brew cleanup -s
brew cleanup -s  0.73s user 3.52s system 58% cpu 7.297 total
```
After
```
$ time brew cleanup -s
brew cleanup -s  0.69s user 2.57s system 139% cpu 2.341 total
```
Closes  Homebrew/homebrew#42968 .
Signed-off-by: Xu Cheng <xucheng@me.com> 
						
						
					 
					
						2015-08-17 01:54:03 +08:00 
						 
				 
			
				
					
						
							
							
								Mike McQuaid 
							
						 
					 
					
						
						
						
						
							
						
						
							9025719968 
							
						 
					 
					
						
						
							
							cleanup: fix reversed prune time.  
						
						
						
						
					 
					
						2015-08-16 17:50:33 +01:00 
						 
				 
			
				
					
						
							
							
								Mike McQuaid 
							
						 
					 
					
						
						
						
						
							
						
						
							76316a82cb 
							
						 
					 
					
						
						
							
							cleanup: tweak prune code.  
						
						
						
						
					 
					
						2015-08-16 16:57:12 +01:00 
						 
				 
			
				
					
						
							
							
								Martin Afanasjew 
							
						 
					 
					
						
						
						
						
							
						
						
							e85e57b217 
							
						 
					 
					
						
						
							
							cleanup: make --force less aggressive  
						
						... 
						
						
						
						Change behavior for `brew cleanup` as follows:
- If `--force` is supplied, remove only outdated keg-only packages.
- If `--prune=<days>` is supplied, remove both logs and cached downloads
  older than the specified number of days. Use `--prune=all` to remove
  all logs and cached downloads irrespective of age.
- By default, remove logs after 14 days and cached downloads never.
Also centralizes handling of `--prune`, thus removing duplicate logic.
This is motivated by commit 17eee232838d4639b25f863aa342b1dda61b81bc
that made `--force` much more aggressive and made it override whatever
was specified via `--prune`, completely removing all:
- outdated keg-only packages
- cached downloads irrespective of age
- logs irrespective of age
This made it impossible to remove outdated keg-only packages without
also deleting all cached downloads, which is at least inconvenient for
people with limited bandwidth wanting to rebuild packages later.
Closes  Homebrew/homebrew#42970 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> 
						
						
					 
					
						2015-08-16 16:47:24 +01:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							5414597913 
							
						 
					 
					
						
						
							
							cleanup: avoid duplicated logic  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#42900 .
Signed-off-by: Xu Cheng <xucheng@me.com> 
					
						2015-08-14 15:52:57 +08:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							203cecb463 
							
						 
					 
					
						
						
							
							add Formula.racks  
						
						... 
						
						
						
						Also exclude symlink when enumerating installed racks. 
						
						
					 
					
						2015-08-14 15:52:56 +08:00 
						 
				 
			
				
					
						
							
							
								Mike McQuaid 
							
						 
					 
					
						
						
						
						
							
						
						
							15c3fb32b2 
							
						 
					 
					
						
						
							
							cleanup: remove SCM directories recursively.  
						
						
						
						
					 
					
						2015-08-13 10:34:45 +01:00 
						 
				 
			
				
					
						
							
							
								Mike McQuaid 
							
						 
					 
					
						
						
						
						
							
						
						
							04b350dce5 
							
						 
					 
					
						
						
							
							cleanup: do cleanup even without a Cellar.  
						
						
						
						
					 
					
						2015-08-13 10:31:37 +01:00 
						 
				 
			
				
					
						
							
							
								Mike McQuaid 
							
						 
					 
					
						
						
						
						
							
						
						
							e49a043401 
							
						 
					 
					
						
						
							
							cleanup: remove more on --force or --prune.  
						
						... 
						
						
						
						Remove more logs, use the prune time period and remove version control
checkouts when --force or --prune is used. 
						
						
					 
					
						2015-08-13 10:22:28 +01:00 
						 
				 
			
				
					
						
							
							
								BrewTestBot 
							
						 
					 
					
						
						
						
						
							
						
						
							13d544e11e 
							
						 
					 
					
						
						
							
							Core files style updates.  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#42354 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> 
					
						2015-08-03 13:22:35 +01:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							602ea66a0f 
							
						 
					 
					
						
						
							
							bottle_resolve_version: return PkgVersion  
						
						
						
						
					 
					
						2015-07-24 15:59:28 +08:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							74d99d647d 
							
						 
					 
					
						
						
							
							cleanup: rescue TapFormulaAmbiguityError caused by Dependency#to_formula  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#40682 .
Signed-off-by: Xu Cheng <xucheng@me.com> 
					
						2015-06-15 12:55:47 +08:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							036b9f6913 
							
						 
					 
					
						
						
							
							cleanup: use bottle_resolve_version  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#40378 .
Signed-off-by: Xu Cheng <xucheng@me.com> 
					
						2015-06-07 23:51:15 +08:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							82745ff9b6 
							
						 
					 
					
						
						
							
							cleanup: use Formula#full_name  
						
						
						
						
					 
					
						2015-05-29 17:02:22 +08:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							dcf0efc9d2 
							
						 
					 
					
						
						
							
							cleanup: load formula from rack and using ARGV.resolved_formulae  
						
						
						
						
					 
					
						2015-05-27 13:53:41 +08:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							a5c9c586ff 
							
						 
					 
					
						
						
							
							Move can_cleanup? off of the formula instance  
						
						
						
						
					 
					
						2015-04-17 22:58:02 -04:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							338a08d8d6 
							
						 
					 
					
						
						
							
							Ask the formula if it can be cleaned up once  
						
						
						
						
					 
					
						2015-04-17 22:58:02 -04:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							505d06c176 
							
						 
					 
					
						
						
							
							Simplify cleanup eligibility check  
						
						
						
						
					 
					
						2015-04-17 22:58:02 -04:00 
						 
				 
			
				
					
						
							
							
								Mike McQuaid 
							
						 
					 
					
						
						
						
						
							
						
						
							451a07cc4e 
							
						 
					 
					
						
						
							
							cleanup: add --prune to delete old cache files.  
						
						
						
						
					 
					
						2015-04-16 17:52:10 -07:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							3587dc441e 
							
						 
					 
					
						
						
							
							Remove duplication from cleanup methods  
						
						
						
						
					 
					
						2015-04-07 21:14:48 -04:00 
						 
				 
			
				
					
						
							
							
								Dominyk Tiller 
							
						 
					 
					
						
						
						
						
							
						
						
							45c9e84c15 
							
						 
					 
					
						
						
							
							cleanup: display file-sizes  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#38404  
					
						2015-04-07 18:32:29 +01:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							a4ff45e5ee 
							
						 
					 
					
						
						
							
							Use pkg_version when comparing against keg versions  
						
						
						
						
					 
					
						2015-04-01 21:15:18 -04:00 
						 
				 
			
				
					
						
							
							
								Xu Cheng 
							
						 
					 
					
						
						
						
						
							
						
						
							89325bbb19 
							
						 
					 
					
						
						
							
							cleanup: optimize perfermance  
						
						... 
						
						
						
						Only remove .DS_Store files from whitelisted directories.
Closes  Homebrew/homebrew#37409 .
Signed-off-by: Xu Cheng <xucheng@me.com> 
						
						
					 
					
						2015-03-07 12:03:36 +08:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							ba48d8c5b9 
							
						 
					 
					
						
						
							
							Use version attribute directly in cache comparisons  
						
						... 
						
						
						
						The bug that prompted the two relevant commits has since been addressed.
Squashed commit of the following:
commit ecca17ede8324efd1175a42300ace8e1e2df30fa
Author: Jack Nagel <jacknagel@gmail.com>
Date:   Sat Dec 27 16:16:12 2014 -0500
    Revert "Don't use pkg_version when cleaning the cache"
    This reverts commit 4d511b5169d78a5d44bbf6c36c17f0c28014a614.
commit e8935de08f6440ae1874ce523f93b19da6b68df3
Author: Jack Nagel <jacknagel@gmail.com>
Date:   Sat Dec 27 16:16:12 2014 -0500
    Revert "Fix cleanup for head-only formulae"
    This reverts commit 510267ffd314c296c0b0969dd27d130a249f16e2. 
						
						
					 
					
						2014-12-27 16:16:16 -05:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							8c0928ccca 
							
						 
					 
					
						
						
							
							Use quiet_system to avoid the shell  
						
						
						
						
					 
					
						2014-12-16 15:27:36 -05:00 
						 
				 
			
				
					
						
							
							
								Mike McQuaid 
							
						 
					 
					
						
						
						
						
							
						
						
							b6c2c8cdc8 
							
						 
					 
					
						
						
							
							cleanup: only clean cache if it exists.  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#33297 . 
					
						2014-10-19 12:28:32 +01:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							def6b1eaf7 
							
						 
					 
					
						
						
							
							Use Keg#uninstall to clean up kegs  
						
						
						
						
					 
					
						2014-06-24 09:56:37 -05:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							4d9d01893e 
							
						 
					 
					
						
						
							
							Move deprecated Formula class methods to compat  
						
						... 
						
						
						
						These have all been moved to Formulary. 
						
						
					 
					
						2014-06-22 15:03:17 -05:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							10a1952d2c 
							
						 
					 
					
						
						
							
							Only "extend self" once on the Homebrew module  
						
						
						
						
					 
					
						2014-06-19 13:10:36 -05:00 
						 
				 
			
				
					
						
							
							
								Adam Vandenberg 
							
						 
					 
					
						
						
						
						
							
						
						
							2cb923649c 
							
						 
					 
					
						
						
							
							only clean logs if logs exist  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#29355 . 
					
						2014-05-17 16:59:14 -07:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							d6483c963a 
							
						 
					 
					
						
						
							
							cleanup: prune old build logs  
						
						... 
						
						
						
						Closes  Homebrew/homebrew#29231 . 
					
						2014-05-14 14:36:34 -05:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							543f2a68e9 
							
						 
					 
					
						
						
							
							Don't send, just call the method directly  
						
						
						
						
					 
					
						2014-03-22 13:16:16 -05:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							037acb81c8 
							
						 
					 
					
						
						
							
							Fix cleanup for head-only formulae  
						
						... 
						
						
						
						Fixes  Homebrew/homebrew#27265 . 
					
						2014-03-06 09:50:44 -06:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							bacf5d7137 
							
						 
					 
					
						
						
							
							Don't use pkg_version when cleaning the cache  
						
						... 
						
						
						
						Fixes  Homebrew/homebrew#27245 . 
					
						2014-03-05 21:45:07 -06:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							17032a600c 
							
						 
					 
					
						
						
							
							Teach commands to work with revisions  
						
						
						
						
					 
					
						2014-03-05 20:12:51 -06:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							c0eb1f10de 
							
						 
					 
					
						
						
							
							Don't clean up lockfiles if the directory doesn't exist  
						
						... 
						
						
						
						Fixes  Homebrew/homebrew#20673 . 
					
						2013-06-21 18:38:39 -05:00 
						 
				 
			
				
					
						
							
							
								Jack Nagel 
							
						 
					 
					
						
						
						
						
							
						
						
							3b56cb02ea 
							
						 
					 
					
						
						
							
							Clean up lockfiles  
						
						
						
						
					 
					
						2013-06-21 15:42:14 -05:00