HB Computer Security | Aide Memoire
  • Introduction
  • Core Technical Skills
    • Core Skills
      • Linux
        • Getting to Know Linux
          • Using the Shell
            • Shells, Terminals, and Virtual Consoles
            • Choose your Shell
            • Shell Commands
              • Non-PATH Commands
              • Command History
                • Command Line Editing
                  • Keystrokes for Navigating Command Lines
                  • Keystrokes for Editing Command Lines
                  • Keystrokes for Cutting and Pasting Text from within Command Lines
                • Command Line Recall
                  • Keystrokes for Command Line Recall
              • Connecting and Expanding Commands
                • Piping Between Commands
                • Sequential Commands
                • Expanding Commands
            • Shell Variables
              • Common Shell Variables
            • Aliases
            • Create your Own Shell Environment
              • Modification Ideas
          • Navigating the Linux File System (LFS)
            • Filesystem Commands
            • Listing Files and Directories
            • File Permissions and Ownership
              • Modifying Permissions with chmod
              • Modifying Default Permissions with umask
              • Change File Ownership with chown
            • Copying, Moving, and Removing Files
            • Finding Files
              • locate
              • find
              • grep
            • Downloading Files
              • axel
              • wget
              • curl
                • User-Agent: Googlebot
          • Working with Text Files
            • Using vim and vi to Edit Text Files
              • Starting with vi
              • Adding Text
              • Moving Around in the Text
            • Text Manipulation
        • System Administration
          • Installing Linux
            • Installing from Live Media
            • Installing in the Enterprise
            • Partitioning Hard Disks
              • Tips for Creating Partitions
          • Account Administration
            • The root Account
              • Becoming root with su
              • sudo
                • The /etc/sudoers File
                • Granting sudo privileges
                  • visudo Guidance
                • Useful sudo Hints
            • Other Administrative Accounts
            • Standard User Accounts
              • Risks of userdel: Orphaned Files
          • Graphical Remote Administration
            • Cockpit
              • Installation Guide
            • Remote Desktop Protocol with xrdp
              • Installation and Configuration
            • Remote Desktop with vnc
              • Installation and Configuration
              • Running VNC as a System Service
          • Managing Running Processes
            • Listing Processes
              • ps
              • top
              • htop
            • Backgrounding and Foregrounding
              • Starting a Background Process
              • Using Foreground and Background Commands
            • Killing and Recining Processes
              • kill and killall
          • Managing Software
            • Managing Software from the Desktop
            • Going Beyond the Limitations of Software Center
              • Debian Packages
                • Advanced Package Tool (apt)
                • Repositories
                • dpkg
        • Shell Scripting
          • Variables
            • Command Substitution
            • Arguments
          • Reading User Input
          • if, else, and elif
          • BOOLEAN Logic
          • Loops
            • for Loops
            • while Loops
          • Functions
          • Local Vs Global Variables
          • Summary
        • Securing Linux
      • Windows
        • Security Hardening
Powered by GitBook
On this page
  • Personal Package Archives
  • Removing Unwanted PPA's

Was this helpful?

  1. Core Technical Skills
  2. Core Skills
  3. Linux
  4. System Administration
  5. Managing Software
  6. Going Beyond the Limitations of Software Center
  7. Debian Packages

Repositories

PreviousAdvanced Package Tool (apt)Nextdpkg

Last updated 1 year ago

Was this helpful?

So far I've really only passively mentioned repositories, so i'd like to take a moment to go over them. Repositories are like digital storehouses for software for your computer. They're online collections of programs, updates, and all sorts of tech goodies. When you want to install new software or update existing programs, your computer checks these repositories to see what's available. Think of it like a massive library where you can borrow the latest books (or software) for your system.

Different Linux distributions have their own repositories, and you can add or remove them to access a wide range of software tailored to your needs.

You've got the reins when it comes to deciding which repositories apt commands tap into. It's all in the setup files stashed away in the /etc/apt directory. The top dog among these files is sources.list, and it's the one apt relies on to figure out where to scout for software. Normally, you'll find a bunch of lines in there with comments describing what's what, and maybe a few extras for optional repositories. But if you're curious about what an uncluttered version looks like with only the active repositories listed, go ahead and peek at the one on your own machine:

cat /etc/apt/sources.list

If you're up for it, third parties have the option to add their repository details as files in the /etc/apt/sources.list.d directory

Personal Package Archives

There might be times when you fancy adding a personal repository to your apt setup manually. It could be for handling your own software project or grabbing something that's not in the usual repositories. You can achieve this through Personal Package Archives (PPAs).

Be extra cautious and double-check that you trust the sources you're adding, as these repositories aren't screened for malware or managed as meticulously as the mainstream ones

Now I know what your first question will be...

"Where do I find PPA's?"

Start by searching online for the software you want to install, along with the term "PPA" or "Personal Package Archive." For example, if you're looking for the latest version of a video editing tool called "MyVideoApp," you might search for "MyVideoApp PPA".

PPA Name: myvideoapp/ppa
Description: Unleash your video editing skills with MyVideoApp!
Packages: myvideoapp, myvideoapp-dev, myvideoapp-docs

There are also community forums. Linux user forums and communities often discuss and share information about PPAs. You may find recommendations and links to PPAs in these discussions.

Generally though, you will usually find PPA's as the need arises.

As you can see, we get some results. Clicking on the top one, we are taken to a site that provides the details for a PPA, which, when added using the provided commands, allows us to install skype using apt:

To add a repository, we can use apt. Let's walk through the process step-by-step:

  1. Find the PPA First, you must identify the PPA you want to add. You can often find the PPA's information on websites, forums, or the developer's documentation.

  2. Add the PPA Use the add-apt-repository command, followed by the PPA's URL or name:

sudo add-apt-repository ppa:example/ppa
  1. Update APT After adding the PPA, update your package list:

sudo apt update
  1. Install Software Once the update is complete, you can install software from the newly added PPA using apt just as you would any other piece of software

A Word of Caution In the screenshot above, you'll notice the commands come with some certificate info for encryption. This stuff matters because we rely on apt to make sure the software packages we get are the exact ones from the repository. If those keys can't be verified, well, there's no guarantee, and it's best to steer clear of that software

Removing Unwanted PPA's

When you add a Personal Package Archive (PPA) to your system, it gets added as a configuration file in the /etc/apt/sources.list.d/ directory. Each PPA typically has its own file named with the PPA's name and a .list extension.

At some point, you're likely to want to uninstall the software and remove the PPA as it will be redundant. So, to get rid of a PPA, follow these steps:

  1. List PPAs First, you can list the PPAs currently added to your system using the following command:

ls /etc/apt/sources.list.d/
  1. Identify the PPA Look for the PPA file that corresponds to the PPA you want to remove. The file names are usually in the format ppa-name-ubuntu-version.list

  2. Remove the PPA To remove the PPA, you can use the add-apt-repository command with the --remove option, followed by the PPA URL or name:

sudo add-apt-repository --remove ppa:example/ppa
  1. Update APT After removing the PPA, it's a good practice to update your package list with:

sudo apt update

Optional Extra: Delete the PPA File If you want to completely remove the PPA file, you can use the rm command. For example, if the PPA file is named example-ubuntu-ppa.list, you can delete it with:

sudo rm /etc/apt/sources.list.d/example-ubuntu-ppa.list

Many PPAs have dedicated websites or pages on platforms like (common for Ubuntu PPAs). These pages provide detailed information about the PPA, including its name, description, and the software it contains. For example, a PPA page for the "MyVideoApp" software might look like this:

Let's say you want to install an application; you go onto or search with apt and find nothing. So, you get your best google-fu on and you find a website for the software you want to install - in this case, let's say it's skype:

Launchpad
Software Centre
Contents of /etc/apt/sources.list
Search Result for "skype ppa"