Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
To remove a repository from Ubuntu, delete or disable its source definition, then refresh APT. Desktop users can select the entry in Software & Updates → Other Software. For a PPA or source managed by add-apt-repository, run sudo add-apt-repository --remove …. For manually added sources, edit the matching file in /etc/apt/sources.list or /etc/apt/sources.list.d/, run sudo apt update, and confirm that the old host no longer appears.
Removing a source changes where APT looks for packages; it does not uninstall packages already installed from that source. Treat package cleanup, signing-key cleanup, and repository removal as separate decisions.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteChoose the removal method
The safest method depends on how the source was added and whether you need a reversible change.
| Method | Best for | Reversible? | Remote systems | Targeting precision | Main risk |
|---|---|---|---|---|---|
| Software & Updates | Desktop users who want to discover enabled entries visually | Yes, if you untick instead of removing | No graphical session required | Removes the selected entry | Labels vary slightly by Ubuntu flavor and release |
add-apt-repository --remove |
PPAs and repositories previously managed by that utility | Usually, by restoring the source definition from a backup | Yes | Matches the repository identity you specify | A guessed PPA name or URI can target the wrong source |
| Manual file edit | Custom URIs, deb822 files, duplicate entries, and sources not recognized by the utility | Yes, when you back up or comment the stanza | Yes | Can remove one stanza while leaving others in the same file | Editing the wrong file or breaking deb822 syntax |
If you are troubleshooting and might need the source again, disable it first. If it is obsolete or untrusted, remove its active definition after recording what you changed.
#1 Best Overall
Remove a repository in Software & Updates
This is the recommended path on an Ubuntu desktop when the source is listed in the graphical repository manager.
- Open the application search and launch Software & Updates.
- Select the Other Software tab. Ubuntu’s own archive entries are shown elsewhere; third-party sources and many PPAs appear here.
- Click the repository entry you want to change. Read the complete line, including its host, distribution codename, and components, before acting.
- Choose Remove and authenticate when prompted.
- Close the window. Ubuntu may ask to reload package information; accept the reload. If no refresh begins automatically, open a terminal and run
sudo apt update.
To make a temporary, reversible change, select the entry and use the control that disables or unticks it instead of removing it. Exact button wording can vary by Ubuntu release and flavor, but the entry should become inactive without deleting its definition.
When the entry is not visible
A source can be stored in a file that the graphical tool does not show clearly, or it may be represented by a deb822 stanza rather than a traditional one-line entry. In that case, use the inspection commands in the manual method below. Do not create a second entry merely because the first one is hard to identify; duplicate definitions can produce confusing update errors.
Remove a PPA or supported source with the terminal
For a PPA or repository originally added with add-apt-repository, provide the same repository identity and request removal:
sudo add-apt-repository --remove ppa:vendor/name
sudo apt update
Replace ppa:vendor/name with the exact PPA name. Review the utility’s output before confirming; do not guess the owner or archive name. If the original source was supplied as a full URI or source line, pass the repository identity accepted by the utility rather than an approximate hostname.
What the --remove option changes
The current Ubuntu manpage describes --remove as disabling matching lines. Without component-specific options, it removes matching deb and deb-src lines and all components. If a modified file under sources.list.d contains only empty or commented lines after the operation, the utility can remove that file.
This command is not a general-purpose search-and-delete operation. It acts on the repository identity you provide, so inspect the output and follow up with sudo apt update. If APT still contacts the host, another definition—often a duplicate in a different file—remains active.
Rank #2
Find and remove a source manually
Manual editing is necessary for many custom repositories, for duplicate definitions, and for sources stored in newer deb822 format. APT reads source definitions from several locations:
/etc/apt/sources.listis the traditional main file used by older Ubuntu releases./etc/apt/sources.list.d/*.listcontains traditional one-line entries./etc/apt/sources.list.d/*.sourcescontains deb822-format entries used by newer Ubuntu documentation;/etc/apt/sources.list.d/ubuntu.sourcesis a common example.
1. Search every active source definition
Search by the vendor name, host, PPA hostname, or another distinctive string:
grep -RniE 'vendor|example.org|ppa.launchpadcontent.net' /etc/apt/sources.list /etc/apt/sources.list.d 2>/dev/null
The command reports matching file names and line numbers. Search both the main file and the entire directory; checking only one location is a common reason a supposedly removed repository continues to appear.
2. Back up before editing
Copy the file before changing it. For a dedicated traditional entry, for example:
sudo cp -a /etc/apt/sources.list.d/vendor.list /etc/apt/sources.list.d/vendor.list.bak
Use a backup name outside the active *.list or *.sources patterns when possible. A file named vendor.list.bak is not normally parsed as a source file, but keeping backups in a separate location avoids ambiguity.
3. Remove one-line entries carefully
Open the file with an editor that is available on your system, identify the exact deb or deb-src line for the target URI or suite, and delete only that line. If the file contains unrelated repositories, leave their lines unchanged.
To disable rather than remove a line, place # at its beginning:
Recommended Free Tools
Rank #3
# deb https://example.org/ubuntu noble main
Commenting preserves the original text and makes rollback straightforward. It also prevents APT from using that source while the line remains in the file.
4. Handle deb822 .sources files as complete stanzas
Deb822 entries use fields such as Types:, URIs:, Suites:, and Components: across multiple lines. Do not delete only the URIs: line or leave a half-formed stanza. Remove the complete stanza whose URI, suite, or components identify the repository, or comment the stanza according to the syntax supported by your release. Preserve the formatting of unrelated stanzas.
5. Move a dedicated file out of the active directory
When a repository has its own file, moving that file is safer than immediately deleting it:
sudo mv /etc/apt/sources.list.d/vendor.list /etc/apt/sources.list.d/vendor.list.disabled
sudo apt update
The new suffix keeps the file available for inspection or restoration while preventing it from being treated as an active .list file. Use the same approach for a dedicated .sources file, changing the suffix so it no longer matches APT’s active pattern.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallNever delete the entire /etc/apt/sources.list.d directory. Other repositories may be stored there.
Disable versus remove: which should you choose?
Disable temporarily
Disable a source when you are isolating an update failure, testing whether a package came from that archive, or expect to restore the repository. In the GUI, untick the entry. In a file, comment the line or move a dedicated file to a non-active suffix. The original URI and options remain available for rollback.
Remove permanently
Remove the definition when the repository is obsolete, has been replaced, or is no longer trusted. Delete the matching line or stanza, or use add-apt-repository --remove for a supported entry. Keep a backup until a successful update confirms that no other source depends on the change.
Rank #4
Removing a source does not remove its packages
A repository is configuration, not an installed package. After its definition is removed, software previously installed from that source normally remains on the system. APT will no longer obtain new versions from the removed archive, so decide separately what should happen to those packages.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Package decision | When it makes sense | What to check |
|---|---|---|
| Keep installed software | The application still works and you do not need updates from the old source | Whether another enabled source can provide future upgrades |
| Reinstall or replace from Ubuntu archives | You want packages maintained by the official Ubuntu repositories | Package name, available version, configuration files, and dependency changes |
| Remove or revert the software | The source is untrusted, the package is no longer needed, or compatibility is a concern | Reverse dependencies and any user data stored by the application |
Do not purge packages automatically just because their source was removed. First identify what is installed and whether another repository supplies the same package. Package removal is a separate administrative action with its own backup and dependency consequences.
Deal with signing keys separately
Removing a repository entry does not automatically remove a signing key. A key may be shared by several enabled repositories, so deleting it merely because one source was removed can break updates from the others.
If a third-party key was installed as a standalone file, Ubuntu documentation allows manual removal from /usr/share/keyrings after you have confirmed that no remaining source references it. Search the active source definitions and key references first. If another repository still uses the key, leave it in place.
Refresh APT and verify the result
Run the update operation after every source change:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →sudo apt update
Watch the complete output. The removed host, PPA, suite, or file should no longer be fetched. A clean update is stronger evidence than merely seeing that a file was renamed.
If the old repository still appears
- Search
/etc/apt/sources.listand every*.listand*.sourcesfile under/etc/apt/sources.list.dfor the hostname, PPA, or suite. - Look for duplicate entries, including a line in the main file and another in a drop-in file.
- Check whether a GUI change disabled one entry while a second definition remains enabled.
- Remove or disable only the remaining matching definitions, then run
sudo apt updateagain.
If APT reports a missing Release file
This usually indicates that an active source points to a repository that does not publish metadata for the requested Ubuntu codename or suite. Confirm the source’s URI and suite, then disable or remove the stale definition. Do not work around the error by trusting an unverified archive.
Best Value
If APT reports a signature or key error
First confirm that the source is still supposed to be enabled. If it should be removed, remove every definition for it and update again. If it is still required, verify that its key is present and correctly referenced; do not delete a shared key or bypass signature checking merely to make the update complete.
If the update fails after an edit
Restore the backup or move the disabled file back to its original name, then run sudo apt update to establish a known-good state. For a deb822 file, restore the complete stanza rather than reconstructing fields from memory. Once APT works again, repeat the removal with a narrower change.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Remote and headless Ubuntu systems
Use the terminal or manual method over SSH, where the graphical application may not be available. Before editing, record the file path and make a backup. Use a command that identifies the exact host or PPA, inspect the proposed change, and run sudo apt update in the same maintenance session. Keep an existing SSH connection open until the update succeeds; repository changes should not normally affect networking, but a verified recovery path is useful when administering a remote machine.
Common cases
Removing a PPA shown in Other Software
You can select the PPA in Software & Updates → Other Software and choose Remove, or use sudo add-apt-repository --remove ppa:owner/name when you know the exact identity. Refresh APT and check that the PPA host is absent from the output.
Removing a custom vendor file
Search the source directories for the vendor’s hostname. Back up the matching .list or .sources file, remove only its stanza, or move the dedicated file to a non-active suffix. Refresh APT and inspect for duplicate definitions.
Removing one suite or component while retaining the repository
When a source file serves multiple suites or components, do not remove the whole file blindly. Edit only the line or deb822 stanza for the unwanted suite or component, preserving the entries still required by the system. A full-file move is appropriate only when every active stanza in that file belongs to the repository you intend to disable.
Security considerations
Ubuntu’s official help guidance states: “Only add software repositories from sources that you trust!” Third-party repositories are not checked by Ubuntu members for security or reliability and may contain harmful software. Removing a source you no longer trust is prudent, but also review packages already installed from it and any signing key that remains on the machine.
Do not solve repository errors by adding an unverified mirror, disabling signature checks, or copying a key from an unknown location. Keep only the sources you need, confirm their suites match your Ubuntu release, and retain backups long enough to undo an accidental edit.
Quick Recap
Final verification checklist
- The intended repository definition was identified by its exact host, PPA, URI, suite, or file.
- Only the matching line or deb822 stanza was changed.
- A backup exists if the change was manual.
- The source is absent or disabled in both
/etc/apt/sources.listand all relevant files under/etc/apt/sources.list.d. sudo apt updatecompletes without contacting the removed source.- Installed packages and signing keys were reviewed separately rather than removed automatically.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

