1168
submitted 1 year ago by coja@lemmy.ml to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] MIDItheKID@lemmy.world 87 points 1 year ago

Reminds me of the Chocolatey Uninstall script warning

[-] 30p87@feddit.de 19 points 1 year ago

What the heck tho, how could a simple script destroy a whole machine?

[-] Natanael@slrpnk.net 23 points 1 year ago* (last edited 1 year ago)

When a software package installer isn't designed to be reversible

I recall a bunch of antiviruses being similarly difficult to completely wipe

[-] 30p87@feddit.de 3 points 1 year ago

It isn't as hard apparently. The script follows the manual way, just delete the folder it's in. What is a problem seems to be changing the path - extracting, changing and reapplying the path variable seems to need 90 lines of Powershell alone. That's just crazy. I'm also wondering how other programs write themselves into path without needing warnings and backups of the path for the user to restore.

[-] MonkderZweite@feddit.ch 5 points 1 year ago* (last edited 1 year ago)

It doesn't say that.

If you setup your system with Chocolatey (is a package manager for Windows), removing Chocolatey will break your setup (removing all installed packages).

[-] 30p87@feddit.de 5 points 1 year ago

Seriously, this script may destroy your machine and require a rebuild. It may have varied results on different machines in the same environment. Think twice before running this.

I don't think "machine" is defined as "installed packages". And reading the code of the script, the breaking part is the whole script, as 90 lines are literally just for the purpose of getting, changing and reapplying the path variable. It (or rather the system and user one) are also backed up to C:\PATH_backups_ChocolateyUninstall.txt.
So it's still a wonder for me how removing something from path, or adding for that matter, is so complicated. Linux just has /usr/bin and /usr/local/bin for custom scripts/programs globally, and .local/bin for user specific executables. If you really want custom paths for your special application then add a script in /etc/profile.d/. No need to permanently change a global variable that could easily break your system at any time.

TL;DR Windows is dumb for having global PATH variables without a way to expand them modularly, which would be much safer.

this post was submitted on 20 Sep 2023
1168 points (98.7% liked)

Linux

48179 readers
1104 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS