Ubuntu ships with the open-source Nouveau driver for NVIDIA cards by default, which lacks support for the full range of GPU features and performance.
This guide covers four ways to install the official NVIDIA proprietary drivers on Ubuntu 24.04, plus how to remove them if needed.
Quick Answer
Open Terminal and run sudo ubuntu-drivers autoinstall to install the recommended NVIDIA driver for your card automatically. Reboot when it finishes.
How to Install NVIDIA Drivers on Ubuntu 24.04
Method 1: Using Software and Updates (GUI)
Step 1: Open Software and Updates
Open the Applications menu, search for Software and Updates, and open it. Navigate to the Additional Drivers tab to see available drivers for your GPU.
Step 2: Select the NVIDIA Driver
Under Additional Drivers, select the NVIDIA proprietary driver entry marked recommended, then click Apply Changes to begin the installation.
Step 3: Reboot the System
Once the installation finishes, reboot the system to load the new NVIDIA driver and replace Nouveau. Log back in to verify the driver is active.
Method 2: Install NVIDIA Drivers Using apt
Step 1: Update Ubuntu Repositories
Open Terminal with CTRL+Alt+T and update the local package index. This ensures you get the latest available NVIDIA driver versions from the Ubuntu repository.
sudo apt update && sudo apt upgrade -y

Step 2: Search for Available NVIDIA Drivers
Search the Ubuntu repository for available NVIDIA driver packages. The output lists versions such as nvidia-driver-535, nvidia-driver-550, and others.
sudo apt search nvidia-driver

Step 3: Install the NVIDIA Driver
Replace nvidia-driver-535 with the version you want to install. Choose the highest version marked recommended for the most current stable driver.
sudo apt install nvidia-driver-535

Step 4: Reboot the System
Reboot the system after installation to apply the driver. The GPU will use the NVIDIA proprietary driver instead of Nouveau after the reboot.
sudo reboot
Method 3: Install Using ubuntu-drivers autoinstall
This method detects your GPU and installs the most compatible NVIDIA driver automatically, without needing to look up the correct package name.
Step 1: Get the List of Recommended Drivers
Run ubuntu-drivers devices to identify your NVIDIA GPU model and see which driver version Ubuntu recommends for your specific graphics card.
sudo ubuntu-drivers devices
Step 2: Install the Recommended Driver
Run ubuntu-drivers autoinstall to install the recommended driver version automatically. The command selects the best match for your installed GPU.
sudo ubuntu-drivers autoinstall

Step 3: Restart the System
Reboot after the installation completes to load the new NVIDIA driver. The system switches from Nouveau to the proprietary driver on restart.
sudo reboot
Method 4: Install Using the PPA Repository (Latest Drivers)
The graphics-drivers PPA provides the latest NVIDIA driver releases, including newer versions than what Ubuntu’s standard repository offers.
Step 1: Add the Graphics Driver PPA
Add the graphics-drivers PPA to Ubuntu. This repository is maintained by the Ubuntu team and provides up-to-date NVIDIA drivers beyond the default repo.
sudo add-apt-repository ppa:graphics-drivers/ppa

Step 2: Get the Recommended Driver
After adding the PPA, run ubuntu-drivers devices again to get the recommended driver from the new repository rather than the default Ubuntu repo.
sudo ubuntu-drivers devices
Step 3: Install the NVIDIA Driver
Install the recommended driver by specifying the package name, or use autoinstall to let ubuntu-drivers pick and install the best match automatically.
sudo apt install {recommended driver name}

Alternatively, install the latest NVIDIA driver from the PPA repository automatically with the command below instead of specifying a version manually.
sudo ubuntu-drivers autoinstall

Step 4: Reboot the System
Reboot after the PPA driver installs. PPA drivers are typically more current than the default Ubuntu repo but may be less stable on older hardware.
sudo reboot
How to Uninstall NVIDIA Drivers from Ubuntu 24.04
Step 1: List Installed NVIDIA Packages
Run the command below to check which NVIDIA packages are currently installed. The output confirms the driver versions present before removal.
dpkg -l | grep -i nvidia

Step 2: Remove All NVIDIA Drivers
The purge command removes all packages matching the nvidia-* pattern. This strips all NVIDIA proprietary drivers and configuration from the system.
sudo apt remove --purge '^nvidia-.*' -y

If the removal also uninstalls the desktop environment, restore it by running sudo apt install ubuntu-desktop before rebooting the system.
sudo apt install ubuntu-desktop
Step 3: Reboot
Reboot to finalize the removal. Ubuntu will fall back to the open-source Nouveau driver automatically once the NVIDIA drivers are uninstalled.
sudo reboot
When NVIDIA Drivers Are the Right Tool
Use proprietary NVIDIA drivers when running GPU-intensive workloads such as video editing, 3D rendering, gaming on Linux, or CUDA-based computation.
If you only need basic display output and 2D desktop performance, the default Nouveau driver is sufficient and requires no manual installation.