Why can't you uninstall multiple programs at once in Windows?

99

7

Why won't Windows allow you to uninstall or remove multiple programs at once? What is the reasoning behind this? Will it mess up an internal system?

I am not looking for how to uninstall multiple programs at once, I am simply looking for a reason why it wouldn't be an option.

Jeroen

Posted 2014-03-19T15:31:21.093

Reputation: 1 787

9To keep people from uninstalling everything at once...maybe. – M.Bennett – 2014-03-19T15:36:01.477

@M.Bennett I was thinking that too, but there isn't a way to select multiple programs so users cannot really uninstall everything by accident anyway. – Jeroen – 2014-03-19T15:39:04.207

5Actually you can remove multiple programs at once, its only Windows Installer that prevents you from uninstalling multiple programs, thats because it only allows a single instance of itself. Easy enough to delete a programs files, you can delete all the contents of Program Files if you want, that will uninstall those programs just not effectively. – Ramhound – 2014-03-19T15:43:52.363

@Ramhound: You seem to be the only one here who correctly understood the asker's intention: he wants the system to uninstall the programs in sequence. The answerers here understood his question differently: whether it's possible to simultaneously uninstall several programs. Needless to say, in Linux it's easily possible: you just type apt-get -y uninstall prog1 prog2 prog3. – Niccolo M. – 2014-03-20T18:04:52.270

4@NiccoloM My question was actually why you cannot simultaneously. :P – Jeroen – 2014-03-20T18:18:23.710

@Ramhound: You added the comment "there isn't a way to select multiple programs", and that's why I understood you the way Ramhound did. Anyway, I'll soon add my own answer. – Niccolo M. – 2014-03-20T19:26:21.973

@NiccoloM Ah yeah, with that command I meant even without a feature allowing simultaneous installations you'd still not be able to uninstall everything at once as there isn't a way to select all programs at once. – Jeroen – 2014-03-20T19:40:30.120

@NiccoloM Easy in Linux? Try doing that in Red Hat based distributions... – Thorbjørn Ravn Andersen – 2014-03-23T21:23:00.130

Answers

101

If you read anything about how the Windows installer system works, it's obvious they applied some ideas from transactional databases to program installation and maintenance, not to mention the .msi files themselves are a database.

There is always the question in designing any database - do you want speed or accuracy/safety? Given that installers can modify system configuration and that a mishap could render the system inoperable, safety has been given a priority over speed. One of the reasons why .msi installers are so slow is because rollback files are made for each file, etc. that will be modified, and then deleted afterwards - allowing any changes to be "rolled back" if something goes wrong in the middle of things (such as a power outage or system crash).

Now, I believe the MSI engine itself enforces installing, modifying, or removing only one program at a time - if you try to run an .msi while another is uninstalling, for example, it either won't run or will wait for the currently running uninstall to finish. Non-MSI installers may not behave this way - since they don't use the MSI engine. But because of this safety design decision, this is probably why appwiz.cpl insists on only letting one uninstaller be called at once.

CCleaner allows you to kick off uninstallers without waiting for previously running ones to finish. MSI installers will likely still not work in parallel due to the above.

LawrenceC

Posted 2014-03-19T15:31:21.093

Reputation: 63 487

29One thing to note is that package managers on Unix-like systems also won't try to remove several packages at once for pretty much the same reason. If you remove multiple packages they are removed one after another, possibly each in their own transaction. – Joey – 2014-03-19T16:41:49.120

+1 Superb answer! One thing to note. If you have a bunch of standalone executables, like CPU-Z, in a folder then feel free to uninstall (delete) them all at once. – MonkeyZeus – 2014-03-19T20:19:14.260

4@Joey This is true, but you can at least instruct *nix package managers to do that and they will work out the order. I think the bigger issue is that Windows doesn't understand the concept of dependency at the package management level. – tu-Reinstate Monica-dor duh – 2014-03-20T03:43:45.630

4@tudor: I think it's just a difference in how applications are managed on the different OSes. Windows manages applications, while on Unix-likes package managers manage, well, packages, which can be libraries, applications and similar things. Windows can manage such things (it does so internally for sure, e.g. when you enable or disable Windows components), but having 3rd-party libraries system-wide didn't pan out so well in the late 90s, so applications are encouraged to just bundle all their dependencies. – Joey – 2014-03-20T08:06:52.567

@Joey I take your point, but blaming the user (or developer) isn't going to get far in such an open shared space. Users only see applications, but applications are just a subset of packages. Multiple libraries, even with different versions and vendors, just needs to be managed. Requiring the developer to manage it was optimistic at best, IMHO, and resulted in heavy bloat. Windows Store makes some inroads into this, but it's still a long way from automagic dependency resolution, which makes *nixes so much simpler in this regard. – tu-Reinstate Monica-dor duh – 2014-03-20T23:02:35.660

@tudor That's no longer true... Windows Server 2008 and later manage components in a *nix-style manner. See the "Role Management Tool" which handles all dependencies for the roles/components you choose to install. It also allows you to pick multiple things to add/remove and works out the order and dependencies as required. It can be leveraged by 3rd party installers which can register themselves to be added to the list. It still doesn't handle "arbitrary" repositories (although the Web Platform Installer is heading that way) – Basic – 2014-03-21T01:22:21.890

@tudor That's not always true. Take the example of Visual Studio 2005 onwards. Some components at least warn about uninstalling them without firs uninstalling others that depend on them (although they don't necessarily prevent one from uninstalling them, as far as I know). – Agi Hammerthief – 2014-03-21T20:34:51.263

19

This only really applies to programs that use the Windows Installer system.

If a program uses their own (un)installer systems, then there's nothing stopping you from running another uninstaller at the same time.

Windows Installer limits the number of instances as to avoid conflicts being made by multiple programs while they are changing system-wide (often shared) settings and files.

Most uninstallers track what they are changing so they can roll back successfully if there's a failure. If one isn't aware of all the changes being made (by other uninstallers) then it may actually make things WORSE if it tries to roll back a failed install.

The Windows Installer system was created with the intention of being a unified system for all application developers to use (on Windows), to help avoid problems like these.

Ƭᴇcʜιᴇ007

Posted 2014-03-19T15:31:21.093

Reputation: 103 763

9

Uninstallation tasks frequently modify files that are shared by multiple programs, or system files\the Registry (a partial reason for needing administrative power to do it). If multiple uninstall tasks ran at the same time, they could conflict. If you have ever had a run in with "DLL Hell", it would be the same. Other programs or Windows itself could be left in an inconsistent state.

K.A.Monica

Posted 2014-03-19T15:31:21.093

Reputation: 5 887

This is most of what the right answer is about. If program "A" installs non-core Windows DLL "X" then program "B" requires it in its installer, then it will likewise probably be part of the uninstaller. But uninstalling DLL "X" would break program "A". So the uninstaller will usually ask about shared DLLs and other files IF they should be deleted. If run concurrently, this kind of prompting could not work properly. Lastly, and perhaps more importantly, everyone has forgotten the Windows Registry - which is a database-ish core component that is frequently updated in installers/uninstallers. – Darrell Teague – 2014-03-20T18:46:42.297

-1

Uninstalling programs simultaneously, besides having the potential problems other mentioned, have very little benefit: it won't be much faster than uninstalling the programs sequentially. Unintalling a program is a task involving disk IO. Running several programs that do IO isn't faster than running them sequentially (unless the programs are installed on two separate physical disks). In fact, it's likely to be slower because the two competing IO tasks will make the disk cache less efficient and the disk's physical heads will have to jump from place to place.

Niccolo M.

Posted 2014-03-19T15:31:21.093

Reputation: 724

This is irrelevant as an answer. Everything involving disk I/O has the potential to slow down if you do too many things at once, but the only thing Windows really prevents you from doing is simultaneous (un)installs. And there is a good reason to want to be able to do simultaneous (un)installs - it would be much easier for users to be able to queue up a bunch of operations and let them all run together, vs. having to sit and wait for each one to complete in turn. Also, contention issue is obsolete with SSDs. – nobody – 2014-03-21T16:08:15.823