# Ports clean-D issue



## rpowell47 (Jan 1, 2022)

This message started when I would run portsclean -D. Is there an issue to correct and if so what are some ways to accomplish them?


----------



## SirDice (Jan 3, 2022)

Your /usr/ports/distfiles doesn't seem to exist. So there's nothing to clean here either.


----------



## rpowell47 (Jan 3, 2022)

SirDice said:


> Your /usr/ports/distfiles doesn't seem to exist. So there's nothing to clean here either.


Thanks! It seems odd for I carry out the following every morning while sipping my morning coffee:
portsnap fetch update
pkg upgrade
pkg auotremove
portsclean -C
portsclean -D
freebsd-update fetch, and
portsnap extract

You are correct when I #cd /usr/ports/distfiles: No such file or directory. I'm not experienced enough to know how to fix the issue.

Thanks for time and support Sir Dice - Have a great day and new year.


----------



## SirDice (Jan 3, 2022)

Packages don't create distfiles, those are only downloaded when you build from ports. You can remove the entire ports tree if you want, you don't need it if you only use packages.


----------



## SirDice (Jan 3, 2022)

rpowell47 said:


> freebsd-update fetch


This only _fetches_ updates, it does not install them. If you keep an eye on the announce mailing list you don't have to run this _all_ the time, only if there are patch updates available. 



rpowell47 said:


> portsnap extract


This _extracts_ a full source tree every time. It doesn't update anything. This has to be `portsnap fetch update`. But if you only use packages you can remove then entire ports tree.


----------



## rpowell47 (Jan 3, 2022)

After reading the hand book, I carried out the following and here is the result.

# pkg install -f distfiles
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'distfiles' have been found in the repositories

My thought is the distfiles part of the base system?

AhHa, distfiles is in the ports, but I do not remember how to extract the following
freebsd-pkg-1.17.5_GH0.tar.gz


----------



## SirDice (Jan 3, 2022)

'distfiles' is a colloquial term for sources downloaded by ports. Whenever you build a port a 'distfile' is downloaded (that's the original source), extracted, patched and built. If you do not build from ports you will not have any distfiles.


----------



## rpowell47 (Jan 3, 2022)

SirDice said:


> 'distfiles' is a colloquial term for sources downloaded by ports. Whenever you build a port a 'distfile' is downloaded (that's the original source), extracted, patched and built. If you do not build from ports you will not have any distfiles.


Thanks! I had no knowledge of that. Thus, I will pkg remove gutenprint and rebuild from ports.


----------



## SirDice (Jan 3, 2022)

rpowell47 said:


> Thus, I will pkg remove gutenprint and rebuild from ports.


Why do you think you need to do this?


----------



## rpowell47 (Jan 3, 2022)

rpowell47 said:


> Thanks! I had no knowledge of that. Thus, I will pkg remove gutenprint and rebuild from ports.


Well removing gutenprint pkg and install it from ports solved the issue!

Thank you Sir Dice! Your experience and knowledge is why you are a great teacher! Have a Great Day and New Year!!


----------



## SirDice (Jan 3, 2022)

rpowell47 said:


> Well removing gutenprint pkg and install it from ports solved the issue!


There was no issue to resolve.


----------

