- Joined
- Sep 3, 2012
- Messages
- 109
- Motherboard
- ASUS Z170 PRO GAMING
- CPU
- i7-6700
- Graphics
- HD 530
- Mac
- Mobile Phone
How to Uninstall Nvidia Web Driver?
According to the additional information here.
To uninstall the NVIDIA Web Driver and the NVIDIA Driver Manager, follow the steps below:
STEP 1: Open the NVIDIA Driver Manager from the System Preferences or through the menu bar item.
STEP 2: Click on the padlock icon and enter an Administrator password.
STEP 3: Click the Open Uninstaller button.
STEP 4: Click Uninstall and then Continue Uninstallation on the Warning screen: The Warning screen lets you know that you will need to restart your system once the installation process is complete.
STEP 5: Re-enter an Administrator password and click OK. Once the NVIDIA Web Driver and NVIDIA Driver Manager have been removed from the system, click Restart.
root@x:/Library/PreferencePanes/NVIDIA Driver Manager.prefPane/Contents/MacOS/NVIDIA Web Driver Uninstaller.app/Contents# pkgutil --expand Resources/NVUninstall.pkg /tmp/foo
root@x:/Library/PreferencePanes/NVIDIA Driver Manager.prefPane/Contents/MacOS/NVIDIA Web Driver Uninstaller.app/Contents# ll /tmp/foo/
total 8
-rw-r--r-- 1 root wheel 475 5 Oct 17:10 PackageInfo
drwxr-xr-x 3 dwhitla admin 96 5 Oct 17:10 Scripts
root@x:/Library/PreferencePanes/NVIDIA Driver Manager.prefPane/Contents/MacOS/NVIDIA Web Driver Uninstaller.app/Contents# pushd /tmp/foo
/tmp/foo /Library/PreferencePanes/NVIDIA Driver Manager.prefPane/Contents/MacOS/NVIDIA Web Driver Uninstaller.app/Contents
root@x:/tmp/foo# ll
total 8
-rw-r--r-- 1 root wheel 475 5 Oct 17:10 PackageInfo
drwxr-xr-x 3 dwhitla admin 96 5 Oct 17:10 Scripts
root@x:/tmp/foo# cat PackageInfo
<?xml version="1.0" encoding="utf-8"?>
<pkg-info overwrite-permissions="true" relocatable="false" identifier="com.nvidia.combo-uninstall-pkg" postinstall-action="none" version="0" format-version="2" generator-version="InstallCmds-662 (17A347)" auth="root">
<bundle-version/>
<upgrade-bundle/>
<update-bundle/>
<atomic-update-bundle/>
<strict-identifier/>
<relocate/>
<scripts>
<postinstall file="./postinstall"/>
</scripts>
</pkg-info>root@x:/tmp/foo# ll
total 8
-rw-r--r-- 1 root wheel 475 5 Oct 17:10 PackageInfo
drwxr-xr-x 3 dwhitla admin 96 5 Oct 17:10 Scripts
root@x:/tmp/foo# ll Scripts
total 8
-r-xr-xr-x 1 dwhitla admin 3932 7 Sep 03:08 postinstall
root@x:/tmp/foo#cat Scripts/postinstall
#!/usr/bin/perl
#
# NVUninstall postinstall script
#
use strict;
print "Starting...\n";
## We only support uninstalling the Web Driver on the boot volume "/"
if ($ARGV[2] ne "/")
{
print "Error: invalid target \"$ARGV[2]\"\n";
exit(1);
}
my $appSupportPath = "/Library/Application Support/NVIDIA";
my $osBuild = `defaults read /System/Library/CoreServices/SystemVersion.plist ProductBuildVersion`;
chomp($osBuild);
## Create a directory in /tmp to move items for deletion to
my $uuid = `uuidgen`;
chomp($uuid);
my $ToBeDeleted = "/tmp/$uuid";
mkdir($ToBeDeleted, 0755);
print "Clearing NVRAM settings\n";
removeWebDriverBootArg();
print "Removing pref pane launchd plists\n";
removePrefPaneLaunchdPlists();
print "Removing pref pane bundle\n";
removePrefPaneBundle();
print "Removing var tmp directories\n";
removeVarTmpDirs();
print "Removing driver components\n";
removeWebDriverComponents(); # now /Library/Extensions too
print "Removing legacy web release files\n";
removeLegacyWebReleaseFiles();
print "Removing preference files\n";
removeNVUserPrefs();
print "Done\n";
##################################
## Work routines from here down ##
##################################
sub removeNVUserPrefs()
{
my @users = `ls /Users 2> /dev/null`;
foreach my $user (@users)
{
chomp($user);
##
## for some reason, `ls` includes entries that start
## with dot. so, explicitly skip it here.
##
next if ($user =~ /^\./);
my $prefsPath = "/Users/$user/Library/Preferences/ByHost";
my @prefs = `ls $prefsPath/com.nvidia.nvagent.* $prefsPath/com.nvidia.nvprefpane.* 2> /dev/null`;
foreach my $pref (@prefs)
{
chomp($pref);
stageToDelete($pref);
}
}
}
sub removeLegacyWebReleaseFiles()
{
stageToDelete("/Library/Application Support/NVIDIA/NVIDIA Driver Restore.mpkg");
stageToDelete("/usr/bin/NVIDIARecovery");
}
sub removeWebDriverComponents()
{
# also works with old kext location
my @les = `/bin/ls -1 /Library/Extensions | egrep '^NVDA.*Web.kext\$|^GeForce.*Web.*\$'`;
my @sles = `/bin/ls -1 /System/Library/Extensions | egrep '^NVDA.*Web.kext\$|^GeForce.*Web.*\$'`;
foreach my $le (@les)
{
chomp($le);
stageToDelete("/Library/Extensions/$le");
}
foreach my $sle (@sles)
{
chomp($sle);
stageToDelete("/System/Library/Extensions/$sle");
}
}
sub removePrefPaneLaunchdPlists()
{
my $agentPlist = "/Library/LaunchAgents/com.nvidia.nvagent.plist";
my $helperPlist = "/Library/LaunchDaemons/com.nvidia.nvroothelper.plist";
# Delete agent plist
stageToDelete($agentPlist);
## Delete root helper plist
stageToDelete($helperPlist);
}
sub removePrefPaneBundle()
{
stageToDelete("/Library/PreferencePanes/NVIDIA Driver Manager.prefPane");
}
sub removeVarTmpDirs()
{
my @files = qw(nvmenu nvprefpane nvagent nvroothelper);
foreach (@files)
{
stageToDelete("/var/tmp/com.nvidia/com.nvidia.$_");
}
}
sub stageToDelete($)
{
my $path = shift;
if (-e $path)
{
system("/bin/mv -f '$path' $ToBeDeleted/.");
}
}
sub removeWebDriverBootArg()
{
##
## $ nvram boot-args
## boot-args debug=0x14e -v nvda_drv=1
##
## Create array of args from nvram
my @args = split(/\s/, `nvram boot-args 2> /dev/null`);
## remove "boot-args" at the beginning
shift(@args);
## remove "nvda_drv" and "nvda_drv=*"
my @cleanArgs = grep {!/^nvda_drv$/ && !/^nvda_drv=/} @args;
## skip nvram if nothing has changed
if (@args != @cleanArgs)
{
if (@cleanArgs)
{
system("/usr/sbin/nvram boot-args=\"@cleanArgs\"");
}
else
{
## if the new args is empty, delete the boot-args entry.
system("/usr/sbin/nvram -d boot-args");
}
}
}
No. The uninstall script won't run in recovery mode (you can however perform equivalent steps manually in the Recovery Partition Terminal utility). To just run the script though, you need to have remote terminal access over SSH. All you need to do is:Thanks for that @dwhitla I am in the same situation. Incredibly frustrating. Forgive my dumb question, would I need to type ALL OF THAT by hand in terminal (assuming in recovery mode)? Is there an easier way. Did this eliminate the Web Drivers?
Thanks again!
If you want to uninstall them from recovery you can do the following, replacing Macintosh HD with your root disk labelIs there an easier way.
# v="/Volumes/Macintosh HD"
# cd "$v"/Library/Extensions
# rm -rf GeForce*
# rm -rf NVDA*
# touch .
# cd "$v"/System/Library/Extensions
# rm -rf GeForce*Web*
# touch .
# kextcache -u "$v"
# reboot
This will remove the kexts but the installer installed more than kexts. Thats why I posted the perl script - if you want you can just perform the equivalent steps manually in recovery mode.If you want to uninstall them from recovery you can do the following, replacing Macintosh HD with your root disk label
remove the drivers and update folder timestampsCode:# v="/Volumes/Macintosh HD"
rebuild cacheCode:# cd "$v"/Library/Extensions # rm -rf GeForce* # rm -rf NVDA* # touch . # cd "$v"/System/Library/Extensions # rm -rf GeForce*Web* # touch .
Code:# kextcache -u "$v" # reboot
If you want to uninstall them from recovery you can do the following, replacing Macintosh HD with your root disk label
remove the drivers and update folder timestampsCode:# v="/Volumes/Macintosh HD"
rebuild cacheCode:# cd "$v"/Library/Extensions # rm -rf GeForce* # rm -rf NVDA* # touch . # cd "$v"/System/Library/Extensions # rm -rf GeForce*Web* # touch .
Code:# kextcache -u "$v" # reboot