1. Home
  2. Linux

How to edit PPAs in Linux Mint

Are you a Linux Mint user? Do you need to figure out how to edit your PPAs on your system but don’t know what to do? We can help! Follow along in this guide as we go over how to edit PPAs in Linux Mint!

 edit PPAs in Linux Mint

Edit PPAs in Linux Mint – GUI

If you’re a Linux Mint user, chances are you’re not a huge fan of dealing with the terminal. Thankfully, it is possible to edit PPAs in Linux Mint with a GUI. Here’s how to do it.

First, press the Win key on the keyboard to open up the search window on Cinnamon, Mate, or whatever Linux Mint desktop you are using. From there, type in “Software Sources.”

If you can’t find the app in the search results, press Alt + F2 to open up the quick launch menu. After that, type in the pkexec mintsources command and press the Enter key to open it.

Once you are in the Software Sources app in Linux Mint, you’ll see several different choices to choose from. There are “Official Repositories,” “PPAs,” “Additional Repositories,” “Authentication Keys,” and “Maintenance.”

To edit (aka enable, disable or even add new software sources), find the “PPAs” section, and click on it. This area handles all third-party software repos you add to Mint.

To add a new PPA, click on the “Add” button, and add it. To remove one, click “Remove,” and to edit an existing repo, click the “Edit” button.

When you’ve finished editing your software sources in Linux Mint, close the app. 

Edit PPAs in Linux Mint – Terminal 

Another way to edit your software sources list in Linux Mint is via the terminal, by opening up the /etc/apt/sources.list.d/ folder. In this area, Linux Mint holds all software sources. Each PPA you add to your system gets its file in this folder. 

To start the editing process, you will need to open up a terminal window on the Linux Mint desktop. Press Ctrl + Alt + T on the keyboard or, search for “terminal” in the app menu, and open it that way.

With the terminal window open and ready to use, use the CD command and move into the /etc/apt/sources.list.d/ folder. Once you are in this folder, you can run the ls command to view the directory contents.

ls

If you have a lot of PPA files, there may be a lot to sort through. To make it easier, you can combine the ls command with the grep filter command. You can use grep to sort various keywords.

For example, if you’re trying to find the Mozilla security ppa, you’d search for the command below.

ls | grep "mozilla"

Remove a PPA

If you want to remove a PPA from Linux Mint entirely, you can do it right in the folder using the basic Bash terminal commands. To delete one PPA from the system, start using the rm command, and specify the PPA filename.

For example, to delete the Mozilla Security PPA from Linux Mint (the PPA that provides fast Firefox and Thunderbird updates), you can run the rm command alongside the “ubuntu-mozilla-security-ppa-focal.list” file. 

cd /etc/apt/sources.list.d/
sudo rm ubuntu-mozilla-security-ppa-focal.list

To remove any PPA list file from your Linux Mint PC, simply replace the “my_ppa_file_here.list with the PPA file you wish to remove from Linux Mint (that resides in /etc/apt/sources.list.d/.

cd /etc/apt/sources.list.d/

sudo rm my_ppa_file_here.list

After your PPA is removed from Linux Mint, you will need to run the update command. This command will ensure that Linux Mint knows that the old PPA is no longer on the system. 

sudo apt update

Once updated, your PPA will be removed. 

Edit an existing PPA

It is possible to edit any existing PPA on Linux Mint using the terminal. To do it, you’ll need first to enter the /etc/apt/sources.list.d/ directory using the CD command below.

cd /etc/apt/sources.list.d/

From here, you’ll need to run the ls command to view the contents of the folder so that you can locate one for editing purposes. 

ls 

Or for better filtering.

ls | grep "name of ppa"

When you’ve figured out the name of your PPA, use the nano text editor to edit the PPA. For example, to edit the Mozilla Security PPA, you’d enter:

sudo nano ubuntu-mozilla-security-ppa-focal.list

Once in editing mode, use the Nano text editor to tweak and change what you like. When done, press Ctrl + O to save it and press Ctrl + X to exit the editing.

Use the following command example below to edit any PPA.

cd /etc/apt/sources.list.d/

sudo nano my-ppa-file.list

Add a new PPA

Adding a new PPA to Linux Mint over the terminal is much, much more straightforward than removing or editing them. If you’d like to add a new PPA to Linux Mint, simply use the add-apt-repository command below.

sudo add-apt-repository ppa:my-ppa/ppa

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.