laravel 从 Windows 系统中删除 Homestead 和 Vagrant 的最干净方法是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27067192/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 16:48:48  来源:igfitidea点击:

What's the cleanest way to remove Homestead and Vagrant from a Windows system?

laravelvagrantcomposer-phpwindows-10

提问by aalaap

I followed the instructions in Laravel docsto install Vagrant and Homestead on Windows 10, but now I've decided to move the whole development stuff to another dedicated server running Debian.

我按照Laravel 文档中的说明在Windows 10 上安装 Vagrant 和 Homestead,但现在我决定将整个开发内容移到另一台运行 Debian 的专用服务器上。

I need to fully remove Vagrant, Homestead, Composer as well as AMPPS (old stuff) from the Windows 10 desktop. It should be easy to simply uninstall Vagrant and AMPPS, but how do I go about cleaning up the remaining things?

我需要从 Windows 10 桌面完全删除 Vagrant、Homestead、Composer 以及 AMPPS(旧东西)。简单地卸载 Vagrant 和 AMPPS 应该很容易,但是我该如何清理剩余的东西呢?

I don't need to keep any of the code etc. I've already got that in a different location.

我不需要保留任何代码等。我已经在不同的位置得到了它。

回答by George Cummins

Virtual Machine

虚拟机

Remove the homestead VM by running

通过运行删除 homestead VM

vagrant box remove laravel/homestead


Homestead

家园

If you installed Homestead via composer with the following command:

如果您使用以下命令通过 composer 安装了 Homestead:

composer global require laravel/homestead

run the opposite to remove it:

运行相反的操作将其删除:

composer remove laravel/homestead

This will remove the .composer/vendor/laravel directory, including its 'homestead' subdirectory. The 'global' keyword is not required.

这将删除 .composer/vendor/laravel 目录,包括其 'homestead' 子目录。'global' 关键字不是必需的。

On a Mac or Linux system, the Homestead configuration files can be removed by deleting the '~/.homestead' directory. You may need to hunt a little to find the directory on your Windows system. Don't worry too much if you can't find it; the directory is small and innocuous.

在 Mac 或 Linux 系统上,可以通过删除 '~/.homestead' 目录来删除 Homestead 配置文件。您可能需要稍微搜索一下才能找到 Windows 系统上的目录。如果找不到也不要太担心;该目录很小且无害。



Composer

作曲家

Composer is usually installed as a Windows application; check Add/Remove programs (or the Windows 10 equivalent) to uninstall it.

Composer 通常作为 Windows 应用程序安装;检查添加/删除程序(或 Windows 10 等效程序)以卸载它。

If you installed Composer manually and it does not appear in your list of installed apps, simply remove the 'composer' binary and the configuration directory (~/.composer on Mac/Linux systems).

如果您手动安装 Composer 并且它没有出现在您已安装的应用程序列表中,只需删除“composer”二进制文件和配置目录(Mac/Linux 系统上的 ~/.composer)。

回答by terdia07

Step 1: Get a list of all installed boxes using

第 1 步:使用获取所有已安装框的列表

$ vagrant box list

Step 2: Run vagrant remove command, specify the box name, version, and provider for example

第二步:运行vagrant remove命令,指定box名称、版本和提供者例如

$ vagrant box remove laravel/homestead --box-version=0.4.4 --provider=virtualbox