daytonaio / docs

Official Documentation for Daytona
https://daytona.io/docs
Apache License 2.0
32 stars 12 forks source link

Uninstall command does not work in Ubuntu #90

Closed inovakdayt closed 3 months ago

inovakdayt commented 4 months ago

command for posix compatible shell:

daytona purge
sudo rm $(where daytona)

does not work in Ubuntu 20.04. Command where does not exist

Anshgrover23 commented 4 months ago

@inovakdayt in Linux we use whereis instead of where

ghost commented 4 months ago

@inovakdayt image use this command instead daytona purge
sudo rm $(whereis daytona)

ghost commented 3 months ago

@Tpuljak we should use whereis instead of where as in most of linux distros whereis works perfectly while where command is only useful for some specified distros which i have not seen yet . also i want to specify that where command works fine and is only useful there. Hence I , Divanshu Grover request you to please reply me on this topic .

Tpuljak commented 3 months ago

@Divanshu-Grover I understand your point.

The reason we chose to use where is that it returns only the path, while whereis returns binaryName: PATH so sudo rm $(whereis daytona) would not work in that scenario.

Nevertheless, I suggest that we remove sudo $(where daytona) from the docs instructions altogether since, with https://github.com/daytonaio/daytona/pull/897, the purge process now displays the exact path of the binary so sudo $(where daytona) became obsolete.

ghost commented 3 months ago

@Tpuljak I think you could have used which instead of where and below is the proof that which gives output same as where i.e. It returns only the path image

Also, We can do the same thing with whereis

sudo rm $(whereis daytona | awk '{print $2}')

this would print the second word which the path that we require

Tpuljak commented 3 months ago

I know it returns the same path, the issue was with the 2 words.

We can use sudo rm $(whereis daytona | awk '{print $2}').

To conclude:

ghost commented 3 months ago

Hi @Tpuljak ,

I've submitted a PR that addresses the issue with the uninstall command in both the macOS and Unix[linux] documentation. The commands have been updated to ensure proper uninstallation of daytona. Please review and let me know if any further adjustments are needed.