Ash258 / Scoop-Core

Shovel. Alternative, more advanced, and user-friendly implementation of windows command-line installer scoop.
https://shovel.ash258.com
GNU General Public License v3.0
205 stars 11 forks source link

Uninstalling scoop via scoop uninstal scoop #155

Open possum-enjoyer opened 3 years ago

possum-enjoyer commented 3 years ago

Uninstalling scoop the old way by uninstalling the scoop app doesn't work anymore because the YamlDotNet.dll is loaded into the current powershell session. Terminate the powershell session and remove the ./scoop folder from the userprofile path works as a workaround.

image

Ash258 commented 2 years ago

Seems that Core 7.1.4 changed the behaviour of dll loading? I pushed a small change, which will reduce this error in some cases, but not all of them.

PowerShell 5 ```powershell pwsh@7.2.0-preview.9> docker run -ti shovelinstaller/shovel powershell Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\> $VerbosePreference = 'continue' PS C:\> shovel config SCOOP_BRANCH NEW 'SCOOP_BRANCH' has been set to 'NEW' PS C:\> shovel update VERBOSE: Exporting function 'Load-Assembly'. VERBOSE: Exporting function 'Initialize-Assemblies'. VERBOSE: Exporting function 'Get-YamlDocuments'. VERBOSE: Exporting function 'Convert-ValueToProperType'. VERBOSE: Exporting function 'Convert-YamlMappingToHashtable'. VERBOSE: Exporting function 'Convert-YamlSequenceToArray'. VERBOSE: Exporting function 'Convert-YamlDocumentToPSObject'. VERBOSE: Exporting function 'Convert-HashtableToDictionary'. VERBOSE: Exporting function 'Convert-OrderedHashtableToDictionary'. VERBOSE: Exporting function 'Convert-ListToGenericList'. VERBOSE: Exporting function 'Convert-PSCustomObjectToDictionary'. VERBOSE: Exporting function 'Convert-PSObjectToGenericObject'. VERBOSE: Exporting function 'ConvertFrom-Yaml'. VERBOSE: Exporting function 'Get-Serializer'. VERBOSE: Exporting function 'ConvertTo-Yaml'. VERBOSE: Exporting alias 'cfy'. VERBOSE: Exporting alias 'cty'. Updating Scoop... INFO Switching to https://github.com/Ash258/Scoop-Core.git (NEW) * 6c913920 feat(ManifestHelpers): Add Force to Test-Persistence (#205) 2 days ago * d36a0bd7 feat: Load libs unless they are already loaded (#178) 9 days ago * f6735905 fix?(manifest): Prevent not needed manifest.json migration.. 2 weeks ago * 82a3719b fix(format): Fix edge case for gitea repositories 2 weeks ago * 3b79e7a3 fix(scoop-install): Independent installations 4 weeks ago * 6e259c3b fix(Update): Do not fail when Base bucket fail to be added 4 weeks ago * b4ec0a07 fix(scoop-reset): Do not add applications as global only 5 weeks ago * 5bd0d1f8 feat(autoupdate): Better regex debug 6 weeks ago * 19e3f7c8 fix(checkver): URL ping equality with dl function (#188) 7 weeks ago * 33102ba3 fix(ci): Check for UTF16 encoding (#187) 7 weeks ago * 9f0a0a67 feat: Add Base bucket to known (#184) 8 weeks ago * 94412ec3 ref: Multiplatform useragent (#183) 8 weeks ago * 088bffc7 fix(scoop-checkup): Support 7ZIPEXTRACT_USE_EXTERNAL (#182) 8 weeks ago * fbeccb87 ref: Resolve circular dependencies (#181) 2 months ago * 80be38af ref: Drop Reset-Alias function (#180) 2 months ago * 457b93d9 ref: Rename getopt function to not conflict with unix util.. 2 months ago * a92be1b2 feat(scoop-update): Properly summarize failed updates (#177) 2 months ago * a0df58e4 feat(scoop-search): Adopt Resolve-ManifestInformation (#175) 3 months ago * b1d56441 feat: Report failed installations/updates at the end of ex.. 3 months ago * 5084b17b feat(Schema): Initial support for arm64 architecture (#163) 3 months ago * fb9c9f62 feat(CI): Support validation of all archived manifests (#1.. 3 months ago * 606a0272 feat(scoop-home): Adopt Resolve-ManifestInformation (#166) 3 months ago * 9d0d077e feat(scoop-cat): Adopt Resolve-ManifestInformation (#165) 3 months ago Updating 'Base' bucket... * 8231094 goreleaser: Update to version 0.180.2 4 hours ago * 68cb052 goreleaser: Update to version 0.180.1 5 hours ago * aa00e7d rust-analyzer: Update to version 2021-09-27 12 hours ago * 4ffb061 task: Update to version 3.8.0 16 hours ago * 2645707 oh-my-posh: Update to version 5.6.2 34 hours ago Updating 'main' bucket... * c5e61dee5 up: Update to version 1.7.1 4 hours ago * db1223018 goreleaser: Update to version 0.180.2 4 hours ago * f812426bb goreleaser: Update to version 0.180.1 4 hours ago * a8607c9ca circleci-cli: Update to version 0.1.15973 4 hours ago * 9f4ac4a68 chromedriver: Update to version 94.0.4606.61 4 hours ago * cc99ab76d ghostscript: Update to version 9.55.0 5 hours ago * 5fd7fc2df ffmpeg-nightly: Update to version 103886 5 hours ago * 025c9cd93 ffmpeg-nightly-shared: Update to version 103886 5 hours ago * a7129776e vim-nightly: Update to version 8.2.3458 10 hours ago * 6dfd5c533 neovim: Update to version 0.5.1 10 hours ago * 904e86610 marp: Update to version 1.4.1 10 hours ago * b71f4a842 nunit-extension-vs-project-loader: Update to version 3.9.0 12 hours ago * feb894773 neovim-nightly: Update to version 0.6.0-dev-356-gbec7f47ce 12 hours ago * 7636e6fe5 trid: Update to version 2.24-21.09.26 26 hours ago * b9d5219f7 ffmpeg-nightly: Update to version 103833 29 hours ago * fad5be02a ffmpeg-nightly-shared: Update to version 103833 29 hours ago * 70758458c win-acme: Update to version 2.1.19.1138 31 hours ago * 065d1700e tfsec: Update to version 0.58.10 34 hours ago * 5807150dc oh-my-posh3: Update to version 5.6.2 34 hours ago * 190cb8dc4 neovim-nightly: Update to version 0.6.0-dev-344-gb3b02eb52 2 days ago Scoop was updated successfully! PS C:\> get-module powershell-yaml | fl Name : powershell-yaml Path : C:\SCOOP\apps\scoop\current\supporting\yaml\bin\powershell-yaml.psm1 Description : Powershell module for serializing and deserializing YAML ModuleType : Script Version : 0.4.2 NestedModules : {} ExportedFunctions : {ConvertFrom-CloudBaseYaml, ConvertTo-CloudBaseYaml} ExportedCmdlets : ExportedVariables : ExportedAliases : {cfy, cty} PS C:\> shovel cat Base/task --format yaml VERBOSE: Import of lib 'Helpers' initiated from 'C:\SCOOP\apps\scoop\current\lib\core.ps1' VERBOSE: Import of lib 'Git' initiated from 'C:\SCOOP\apps\scoop\current\lib\buckets.ps1' VERBOSE: Import of lib 'getopt' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-cat.ps1' VERBOSE: Import of lib 'help' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-cat.ps1' VERBOSE: Import of lib 'install' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-cat.ps1' VERBOSE: Import of lib 'autoupdate' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'json' initiated from 'C:\SCOOP\apps\scoop\current\lib\autoupdate.ps1' VERBOSE: Import of lib 'decompress' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'manifest' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'ManifestHelpers' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'Versions' initiated from 'C:\SCOOP\apps\scoop\current\lib\ManifestHelpers.ps1' Showing manifest for 'Base/task' version: 3.8.0 description: A task runner / build tool that aims to be simpler and easier to use homepage: https://taskfile.dev license: identifier: MIT url: https://github.com/go-task/task/blob/master/LICENSE changelog: https://github.com/go-task/task/releases/tag/v3.8.0 architecture: 64bit: url: https://github.com/go-task/task/releases/download/v3.8.0/task_windows_amd64.zip hash: 73818d978748ec4d914b7e1209eef54a202fc7e6ebeb2b0bfd991372746c9a73 32bit: url: https://github.com/go-task/task/releases/download/v3.8.0/task_windows_386.zip hash: 00dac9b129ccbb2ae019d2ded470c87baec538a9d97e2b74db9b3e6e5e6d179f arm64: url: https://github.com/go-task/task/releases/download/v3.8.0/task_windows_arm64.zip hash: 6b2567253c9f6b9aaffb39751af0c7ff94c3466bf4c5ec4371fcb00df5485bd3 bin: task.exe checkver: github: https://github.com/go-task/task autoupdate: changelog: https://github.com/go-task/task/releases/tag/v$version architecture: 64bit: url: https://github.com/go-task/task/releases/download/v$version/task_windows_amd64.zip 32bit: url: https://github.com/go-task/task/releases/download/v$version/task_windows_386.zip arm64: url: https://github.com/go-task/task/releases/download/v$version/task_windows_arm64.zip hash: url: $baseurl/task_checksums.txt PS C:\> shovel uninstall scoop --purge VERBOSE: Import of lib 'Helpers' initiated from 'C:\SCOOP\apps\scoop\current\lib\core.ps1' VERBOSE: Import of lib 'Git' initiated from 'C:\SCOOP\apps\scoop\current\lib\buckets.ps1' VERBOSE: Import of lib 'getopt' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'help' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'install' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'autoupdate' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'json' initiated from 'C:\SCOOP\apps\scoop\current\lib\autoupdate.ps1' VERBOSE: Import of lib 'decompress' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'manifest' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'ManifestHelpers' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'Versions' initiated from 'C:\SCOOP\apps\scoop\current\lib\ManifestHelpers.ps1' VERBOSE: Import of lib 'psmodules' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'shortcuts' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'Uninstall' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' WARN This will uninstall Scoop, all the programs that have been installed with Scoop and all persisted data! Are you sure? (yN): y ERROR Couldn't remove C:\SCOOP: Cannot remove item C:\SCOOP\apps\scoop\current\supporting\yaml\bin\lib\net45\YamlDotNet.dll: Access to the p ath 'YamlDotNet.dll' is denied. PS C:\> ```
PowerShell Core 7.1.4 ```powershell pwsh@7.2.0-preview.9> docker run -ti shovelinstaller/shovel pwsh PowerShell 7.1.4 Copyright (c) Microsoft Corporation. https://aka.ms/powershell Type 'help' to get help. PS C:\> $VerbosePreference = 'continue' PS C:\> shovel config SCOOP_BRANCH NEW 'SCOOP_BRANCH' has been set to 'NEW' PS C:\> shovel update VERBOSE: Exporting function 'Load-Assembly'. VERBOSE: Exporting function 'Initialize-Assemblies'. VERBOSE: Exporting function 'Get-YamlDocuments'. VERBOSE: Exporting function 'Convert-ValueToProperType'. VERBOSE: Exporting function 'Convert-YamlMappingToHashtable'. VERBOSE: Exporting function 'Convert-YamlSequenceToArray'. VERBOSE: Exporting function 'Convert-YamlDocumentToPSObject'. VERBOSE: Exporting function 'Convert-HashtableToDictionary'. VERBOSE: Exporting function 'Convert-OrderedHashtableToDictionary'. VERBOSE: Exporting function 'Convert-ListToGenericList'. VERBOSE: Exporting function 'Convert-PSCustomObjectToDictionary'. VERBOSE: Exporting function 'Convert-PSObjectToGenericObject'. VERBOSE: Exporting function 'ConvertFrom-Yaml'. VERBOSE: Exporting function 'Get-Serializer'. VERBOSE: Exporting function 'ConvertTo-Yaml'. VERBOSE: Exporting alias 'cfy'. VERBOSE: Exporting alias 'cty'. Updating Scoop... INFO Switching to https://github.com/Ash258/Scoop-Core.git (NEW) * 6c913920 feat(ManifestHelpers): Add Force to Test-Persistence (#205) 2 days ago * d36a0bd7 feat: Load libs unless they are already loaded (#178) 9 days ago * f6735905 fix?(manifest): Prevent not needed manifest.json migration.. 2 weeks ago * 82a3719b fix(format): Fix edge case for gitea repositories 2 weeks ago * 3b79e7a3 fix(scoop-install): Independent installations 4 weeks ago * 6e259c3b fix(Update): Do not fail when Base bucket fail to be added 4 weeks ago * b4ec0a07 fix(scoop-reset): Do not add applications as global only 5 weeks ago * 5bd0d1f8 feat(autoupdate): Better regex debug 6 weeks ago * 66c38280 feat: Add initial support for arm64 architecture (#152) 6 weeks ago * 19e3f7c8 fix(checkver): URL ping equality with dl function (#188) 7 weeks ago * 33102ba3 fix(ci): Check for UTF16 encoding (#187) 7 weeks ago * 9f0a0a67 feat: Add Base bucket to known (#184) 8 weeks ago * 94412ec3 ref: Multiplatform useragent (#183) 8 weeks ago * 088bffc7 fix(scoop-checkup): Support 7ZIPEXTRACT_USE_EXTERNAL (#182) 8 weeks ago * fbeccb87 ref: Resolve circular dependencies (#181) 2 months ago * 80be38af ref: Drop Reset-Alias function (#180) 2 months ago * 457b93d9 ref: Rename getopt function to not conflict with unix util.. 2 months ago * a92be1b2 feat(scoop-update): Properly summarize failed updates (#177) 2 months ago * a0df58e4 feat(scoop-search): Adopt Resolve-ManifestInformation (#175) 3 months ago * b1d56441 feat: Report failed installations/updates at the end of ex.. 3 months ago * 5084b17b feat(Schema): Initial support for arm64 architecture (#163) 3 months ago * fb9c9f62 feat(CI): Support validation of all archived manifests (#1.. 3 months ago * 606a0272 feat(scoop-home): Adopt Resolve-ManifestInformation (#166) 3 months ago * 9d0d077e feat(scoop-cat): Adopt Resolve-ManifestInformation (#165) 3 months ago * 4145da5f feat(scoop-download): Adopt Resolve-ManifestInformation (#.. 3 months ago Updating 'Base' bucket... * 8231094 goreleaser: Update to version 0.180.2 4 hours ago * 68cb052 goreleaser: Update to version 0.180.1 5 hours ago * aa00e7d rust-analyzer: Update to version 2021-09-27 12 hours ago * 4ffb061 task: Update to version 3.8.0 16 hours ago * 2645707 oh-my-posh: Update to version 5.6.2 34 hours ago Updating 'main' bucket... * c5e61dee5 up: Update to version 1.7.1 4 hours ago * db1223018 goreleaser: Update to version 0.180.2 4 hours ago * f812426bb goreleaser: Update to version 0.180.1 4 hours ago * a8607c9ca circleci-cli: Update to version 0.1.15973 4 hours ago * 9f4ac4a68 chromedriver: Update to version 94.0.4606.61 4 hours ago * cc99ab76d ghostscript: Update to version 9.55.0 5 hours ago * 5fd7fc2df ffmpeg-nightly: Update to version 103886 5 hours ago * 025c9cd93 ffmpeg-nightly-shared: Update to version 103886 5 hours ago * a7129776e vim-nightly: Update to version 8.2.3458 10 hours ago * 6dfd5c533 neovim: Update to version 0.5.1 10 hours ago * 904e86610 marp: Update to version 1.4.1 10 hours ago * b71f4a842 nunit-extension-vs-project-loader: Update to version 3.9.0 12 hours ago * feb894773 neovim-nightly: Update to version 0.6.0-dev-356-gbec7f47ce 12 hours ago * 7636e6fe5 trid: Update to version 2.24-21.09.26 26 hours ago * b9d5219f7 ffmpeg-nightly: Update to version 103833 29 hours ago * fad5be02a ffmpeg-nightly-shared: Update to version 103833 29 hours ago * 70758458c win-acme: Update to version 2.1.19.1138 31 hours ago * 065d1700e tfsec: Update to version 0.58.10 34 hours ago * 5807150dc oh-my-posh3: Update to version 5.6.2 34 hours ago * 190cb8dc4 neovim-nightly: Update to version 0.6.0-dev-344-gb3b02eb52 2 days ago Scoop was updated successfully! PS C:\> get-module powershell-yaml | fl Name : powershell-yaml Path : C:\SCOOP\apps\scoop\current\supporting\yaml\bin\powershell-yaml.psm1 Description : Powershell module for serializing and deserializing YAML ModuleType : Script Version : 0.4.2 PreRelease : NestedModules : {} ExportedFunctions : {ConvertFrom-CloudBaseYaml, ConvertTo-CloudBaseYaml} ExportedCmdlets : ExportedVariables : ExportedAliases : {cfy, cty} PS C:\> shovel cat Base/task --format yaml VERBOSE: Import of lib 'Helpers' initiated from 'C:\SCOOP\apps\scoop\current\lib\core.ps1' VERBOSE: Import of lib 'Git' initiated from 'C:\SCOOP\apps\scoop\current\lib\buckets.ps1' VERBOSE: Import of lib 'getopt' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-cat.ps1' VERBOSE: Import of lib 'help' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-cat.ps1' VERBOSE: Import of lib 'install' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-cat.ps1' VERBOSE: Import of lib 'autoupdate' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'json' initiated from 'C:\SCOOP\apps\scoop\current\lib\autoupdate.ps1' VERBOSE: Import of lib 'decompress' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'manifest' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'ManifestHelpers' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'Versions' initiated from 'C:\SCOOP\apps\scoop\current\lib\ManifestHelpers.ps1' Showing manifest for 'Base/task' version: 3.8.0 description: A task runner / build tool that aims to be simpler and easier to use homepage: https://taskfile.dev license: identifier: MIT url: https://github.com/go-task/task/blob/master/LICENSE changelog: https://github.com/go-task/task/releases/tag/v3.8.0 architecture: 64bit: url: https://github.com/go-task/task/releases/download/v3.8.0/task_windows_amd64.zip hash: 73818d978748ec4d914b7e1209eef54a202fc7e6ebeb2b0bfd991372746c9a73 32bit: url: https://github.com/go-task/task/releases/download/v3.8.0/task_windows_386.zip hash: 00dac9b129ccbb2ae019d2ded470c87baec538a9d97e2b74db9b3e6e5e6d179f arm64: url: https://github.com/go-task/task/releases/download/v3.8.0/task_windows_arm64.zip hash: 6b2567253c9f6b9aaffb39751af0c7ff94c3466bf4c5ec4371fcb00df5485bd3 bin: task.exe checkver: github: https://github.com/go-task/task autoupdate: changelog: https://github.com/go-task/task/releases/tag/v$version architecture: 64bit: url: https://github.com/go-task/task/releases/download/v$version/task_windows_amd64.zip 32bit: url: https://github.com/go-task/task/releases/download/v$version/task_windows_386.zip arm64: url: https://github.com/go-task/task/releases/download/v$version/task_windows_arm64.zip hash: url: $baseurl/task_checksums.txt PS C:\> shovel uninstall scoop --purge VERBOSE: Import of lib 'Helpers' initiated from 'C:\SCOOP\apps\scoop\current\lib\core.ps1' VERBOSE: Import of lib 'Git' initiated from 'C:\SCOOP\apps\scoop\current\lib\buckets.ps1' VERBOSE: Import of lib 'getopt' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'help' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'install' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'autoupdate' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'json' initiated from 'C:\SCOOP\apps\scoop\current\lib\autoupdate.ps1' VERBOSE: Import of lib 'decompress' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'manifest' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'ManifestHelpers' initiated from 'C:\SCOOP\apps\scoop\current\lib\install.ps1' VERBOSE: Import of lib 'Versions' initiated from 'C:\SCOOP\apps\scoop\current\lib\ManifestHelpers.ps1' VERBOSE: Import of lib 'psmodules' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'shortcuts' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' VERBOSE: Import of lib 'Uninstall' initiated from 'C:\SCOOP\apps\scoop\current\libexec\scoop-uninstall.ps1' WARN This will uninstall Scoop, all the programs that have been installed with Scoop and all persisted data! Are you sure? (yN): y Removing C:\SCOOP\shims from path. Scoop has been uninstalled. ```