# Functional alternative to portsclean -C



## morbit (Feb 15, 2010)

Is there similar flag for portmaster?

eg. portsclean -CL && rm -rf /usr/ports/distfiles/*


P.S. rm -rf /usr/ports/distfiles/*  is no the same as portmaster --clean-distfiles-(all)


----------



## fronclynne (Feb 16, 2010)

`# rm -rf /usr/ports/*/*/work`, maybe?


----------



## phoenix (Feb 16, 2010)

`# rm -rf /usr/ports/*/*/work`
Works in every shell.  No need for extra tools.


----------



## SirDice (Feb 16, 2010)

You can also set WRKDIRPREFIX. Then everything will be build there keeping your ports tree nice and clean.


----------



## morbit (Feb 16, 2010)

phoenix said:
			
		

> `# rm -rf /usr/ports/*/*/work`
> Works in every shell.  No need for extra tools.



Yeah, I thought of that, I was under impression it's slower somehow (well make clean in ports root directory is really slow).


----------

