geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


TIP: Cleanup after your ports
Ports and Packages Posted by Jason on Thursday March 15, @12:31AM
from the Prune-Your-Tree dept.
If you use the ports tree to install applications, you should do a make clean after you install an application.

Why? Because when you install a port, it creates a work directory that contains the expanded source code as well as the compiled binaries (it can take up quite a lot of hard disk space). Doing a make clean removes it.

To perform this task, you need to be in the application directory. You can install a port and cleanup all in one command. Let's use bash for example.

login: root
password: *******

# cd /usr/ports/shells/bash2
# make install && make clean

(note: this would download, compile, install bash and remove the temporary files that were used for the install)

<  |  >

 

Related Links
  • Articles on Ports and Packages
  • Also by Jason
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: TIP: Cleanup after your ports
    by NewBee on Friday May 25, @07:47PM
    you can even do: # cd /usr/ports/shells/bash2 # make install clean
    [ Add a Reply to this ]
    • Re: TIP: Cleanup after your ports
      by geektron on Saturday July 21, @06:32PM
      unless there are dependencies. 'make install clean' doesn't catch them. is 'make depend install clean' a valid make target?
      [ Reply to this ]
    Re: TIP: Cleanup after your ports
    by NewBee on Friday May 25, @07:49PM
    you can even do:
    # cd /usr/ports/shells/bash2
    # make install clean
    [ Add a Reply to this ]
    Re: TIP: Cleanup after your ports
    by Clayton Tucker on Wednesday June 27, @09:14PM
    I have already installed various ports on my FBSD box, and forgotten to clean up after the install. My question is whether the following will work or if there's some issue I'm not aware of and I should never do this on pain of killing my system:
    # cd /usr/ports
    # make clean

    Will this have the effect I expect (traverse the directory tree under /usr/ports, cleaning up old work directories for everything I've ever installed) and no side effects? Inquiring minds want to know!
    [ Add a Reply to this ]
    • Re: TIP: Cleanup after your ports
      by Jason on Thursday June 28, @11:00PM
      Yes. This will work, but it will take some time as it will perform a 'make clean' on every port in your ports tree.
      [ Reply to this ]
    Re: TIP: Cleanup after your ports
    by Jason on Monday April 29, @10:09PM
    You can also remove the downloaded tarball(s) from your /usr/ports/distfiles directory with the command:

    make distclean

    A complete install and cleanup could be done with this command:

    make install clean distclean

    This would install the program, remove the extracted tarball working directory, and remove the tarball itself.
    [ Add a Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]