Compile

./configure --prefix=/your/absolute/install/directory

Debian link

apt-get update
apt-cache search <keyword>
apt-get install <package-name>

# Also remove the unnecessary package dependencies
apt-get autoremove openjdk-7-jdk

RedHat

yum search <keyword>
yum install <package-name>

Homebrew

  • Autoremove in brew link

    brew leaves prints all packages that does not depend on other So you can do a logical and on brew leaves and brew deps FORMULA

    brew rm FORMULA
    brew rm $(join <(brew leaves) <(brew deps FORMULA))
    

    use brew_clean script also in here

    brew leaves > brew_packages
    brew_clean brew_packages
    
  • get info about a package brew info <package-name>

  • use homebrew-brewdler to manage your homebrew, run brew brewdle dump to backup your homebrew

  • brew --cache shows brew caches path, run brew cleanup to clean up the caches

  • brew --cellar shows cellar path