-
Notifications
You must be signed in to change notification settings - Fork 170
OSX Uninstallation instructions are wrong #248
Comments
I cannot reproduce your issue. Here is my output: $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.1
BuildVersion: 14B25 $ which ls
/bin/ls $ ls -la /usr/bin | egrep '/opt/chefdk' | awk '{ print $9 }'
berks
chef
chef-apply
chef-client
chef-shell
chef-solo
chef-zero
fauxhai
foodcritic
kitchen
knife
ohai
rubocop
shef
strain
strainer Can you show your output for the following commands? sw_vers which ls ls -la /usr/bin | egrep '/opt/chefdk' |
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.1
BuildVersion: 14B25
$ ls -la /usr/bin | egrep '/opt/chefdk'
lrwxr-xr-x 1 root wheel - 21 Nov 24 14:32 berks -> /opt/chefdk/bin/berks
lrwxr-xr-x 1 root wheel - 20 Nov 24 14:32 chef -> /opt/chefdk/bin/chef
lrwxr-xr-x 1 root wheel - 26 Nov 24 14:32 chef-apply -> /opt/chefdk/bin/chef-apply
lrwxr-xr-x 1 root wheel - 27 Nov 24 14:32 chef-client -> /opt/chefdk/bin/chef-client
lrwxr-xr-x 1 root wheel - 26 Nov 24 14:32 chef-shell -> /opt/chefdk/bin/chef-shell
lrwxr-xr-x 1 root wheel - 25 Nov 24 14:32 chef-solo -> /opt/chefdk/bin/chef-solo
lrwxr-xr-x 1 root wheel - 25 Nov 24 14:32 chef-zero -> /opt/chefdk/bin/chef-zero
lrwxr-xr-x 1 root wheel - 23 Nov 24 14:32 fauxhai -> /opt/chefdk/bin/fauxhai
lrwxr-xr-x 1 root wheel - 26 Nov 24 14:32 foodcritic -> /opt/chefdk/bin/foodcritic
lrwxr-xr-x 1 root wheel - 23 Nov 24 14:32 kitchen -> /opt/chefdk/bin/kitchen
lrwxr-xr-x 1 root wheel - 21 Nov 24 14:32 knife -> /opt/chefdk/bin/knife
lrwxr-xr-x 1 root wheel - 20 Nov 24 14:32 ohai -> /opt/chefdk/bin/ohai
lrwxr-xr-x 1 root wheel - 23 Nov 24 14:32 rubocop -> /opt/chefdk/bin/rubocop
lrwxr-xr-x 1 root wheel - 20 Nov 24 14:32 shef -> /opt/chefdk/bin/shef
lrwxr-xr-x 1 root wheel - 22 Nov 24 14:32 strain -> /opt/chefdk/bin/strain
lrwxr-xr-x 1 root wheel - 24 Nov 24 14:32 strainer -> /opt/chefdk/bin/strainer |
Odd. I'm not sure where that extra column is coming from. Is it possible you have an alias for $ alias ls
-bash: alias: ls: not found We are on the same version of OSX so unless the stat -f '%N %Y' /usr/bin/* | egrep '/opt/chefdk' | awk '{ print $1 }' | sudo xargs -I% rm -f % |
I agree about not using |
I went ahead and created a pull request on the documentation for ChefDK uninstallation: chef-boneyard/chef-web-docs-2016#409 More elegant solution: find /usr/bin -lname '/opt/chefdk/*' -delete |
Even better, thanks! |
Documentation updated: https://docs.getchef.com/install_dk.html#mac-os-x If the change is satisfactory, this issue can be closed. |
FWIW, putting a '' in front of a command in tcsh/bash/zsh will avoid the use of aliases: with % ls -la /usr/bin | egrep '/opt/chefdk' | awk '{ print $9 }'
berks@
chef@
chef-apply@
chef-client@
chef-shell@
chef-solo@
chef-zero@
fauxhai@
foodcritic@
kitchen@
knife@
ohai@
rubocop@
shef@
strain@
strainer@
% \ls -la /usr/bin | egrep '/opt/chefdk' | awk '{ print $9 }'
berks
chef
chef-apply
chef-client
chef-shell
chef-solo
chef-zero
fauxhai
foodcritic
kitchen
knife
ohai
rubocop
shef
strain
strainer +1 for find tho. |
From https://docs.getchef.com/install_dk.html#mac-os-x:
But
$9
is the timestamp, not the filename. This should beprint $10
to work correctly.The text was updated successfully, but these errors were encountered: