Score:2

sudo apt dist-upgrade trying to install packages that do not exist in parrot os ppa

cn flag

I have installed parrotOS PPA in my ubuntu 20.04, so I can easily install and update hacking tools.

I created a script to automatically install some common tools that I use, adding PPA with the following function.

function addTools () {
    file="/etc/apt/sources.list.d/parrot.list"
    echo "deb https://deb.parrotlinux.org/parrot/ rolling main contrib non-free" > ${file}
    echo "#deb-src https://deb.parrotlinux.org/parrot/ rolling main contrib non-free" >> ${file}
    echo "deb https://deb.parrotlinux.org/parrot/ rolling-security main contrib non-free" >> ${file}
    echo "#deb-src https://deb.parrotlinux.org/parrot/ rolling-security main contrib non-free" >> ${file}
    #--- Add key
    echo -e "\n\n ${GREEN}[+]${RESET} Installing ${GREEN}Parrot gpg and keyring${RESET}"
    wget -qO - http://archive.parrotsec.org/parrot/misc/parrotsec.gpg | apt-key add -
    apt-get -y -qq update
    apt-get -y -qq install apt-parrot parrot-archive-keyring --no-install-recommends
}

Then I am updating /etc/apt/preferences.d/parrot-pinning, in order to do the following:

  • If a tool both exists in ubuntu ppa and parrotOS ppa, it will install from ubuntu (So I changed Pin-Priority of ubuntu and debian to be higher than parrot)

Contents of /etc/apt/preferences.d/parrot-pinning:

Package: *
Pin: release o=Parrot
Pin-Priority: 500

Package: *
Pin: release o=Debian
Pin-Priority: 700

Package: *
Pin: release o=Kali
Pin-Priority: 50

Package: *
Pin: release o=Ubuntu
Pin-Priority: 700

Package: *
Pin: release o=vscode stable
Pin-Priority: 700

My problem is

While doing sudo apt dist-upgrade, apt is trying to update tools in parrotOS PPA to a version that does not exist in the mirror.

Excerpt taken after running the command:

Deseja continuar? [S/n] S                #note the Y/n option to continue with upgrade
Err:1 https://mirrors.up.pt/parrot rolling/main amd64 codium amd64 1.60.0-1630974030
  404  Not Found [IP: 2001:690:2200:1200::15 443]
Err:2 https://mirrors.up.pt/parrot rolling/non-free amd64 oracle-instantclient-basic amd64 19.6.0.0.0-0parrot1
  404  Not Found [IP: 2001:690:2200:1200::15 443]
Err:3 https://mirrors.up.pt/parrot rolling/main amd64 metasploit-framework amd64 6.1.2-0parrot1
  404  Not Found [IP: 2001:690:2200:1200::15 443]

Following the url the file does not exist and the latest codium version is codium_1.56.2-1620951495_amd64.deb.

Edit as asked by guiverc

Output of ubuntu-security-status:

2139 packages installed, of which:
1877 receive package updates with LTS until 4/2025
 247 could receive security updates with ESM Apps until 4/2030
  14 packages are from third parties
   1 package is no longer available for download

Packages from third parties are not provided by the official Ubuntu
archive, for example packages from Personal Package Archives in
Launchpad.
For more information on the packages, run 'ubuntu-security-status
--thirdparty'.

Packages that are not available for download may be left over from a
previous release of Ubuntu, may have been installed directly from a
.deb file, or are from a source which has been disabled.
For more information on the packages, run 'ubuntu-security-status
--unavailable'.

Enable Extended Security Maintenance (ESM Apps) to get 1 security
update (so far) and enable coverage of 247 packages.

This machine is not attached to an Ubuntu Advantage subscription.
See https://ubuntu.com/advantage

Output of sudo apt update: (translated text to english)

Atg:1 http://pt.archive.ubuntu.com/ubuntu focal InRelease
Atg:2 http://pt.archive.ubuntu.com/ubuntu focal-updates InRelease              
Atg:3 http://pt.archive.ubuntu.com/ubuntu focal-backports InRelease            
Atg:4 http://packages.microsoft.com/repos/code stable InRelease                
Atg:5 http://security.ubuntu.com/ubuntu focal-security InRelease               
Atg:6 https://repo.pritunl.com/stable/apt focal InRelease                      
Atg:7 https://packages.microsoft.com/repos/ms-teams stable InRelease           
Atg:8 https://deb.parrot.sh/parrot rolling InRelease        
Atg:9 https://deb.parrot.sh/parrot rolling-security InRelease
Reading package list...
building dependency tree...       
Reading state information...
36 packets can be upgraded. run 'apt list --upgradable' to see them.

Closed dispute

If a question on how to use third party aplications, in this case a third party PPA on a ubuntu distro is off-topic on askubuntu, Where should I ask said question?

Terrance avatar
id flag
Adding 3rd party PPAs, especially from other OS distros can break your installation. I have heard where people have added Elementary OS PPAs into Ubuntu, and their Ubuntu updated to Elementary destroying their Ubuntu installation. You have to be extremely careful with these types of PPAs. You can use them for installations of specific applications, but I would recommend turning off these PPAs once the application is installed.
guiverc avatar
cn flag
If you **were** using Ubuntu, you're likely not any longer; check `ubuntu-security-status`. You've provided insufficient detail, but Debian is likely far newer than Ubuntu (if *focal*, eg. GNOME is 38 and 40.2 packages are just hitting Debian *testing*; already exist in Ubuntu *impish* but you've likely added a later Debian to your old-old-stable Ubuntu LTS) ; `sudo apt update` detail would help affirm/refute what I fear but we can't see that output.
Joel Russo avatar
cn flag
If a question on how to use third party aplications, in this case a third party PPA on a ubuntu distro is off-topic on askubuntu, Where should I ask said question?
Kulfy avatar
mz flag
@JoelRusso Ubuntu and Parrot OS are pretty different considering delivery of software versions. If you mix repositories, you might lead your Ubuntu installation to become [FrankenDebian](https://wiki.debian.org/DontBreakDebian). I agree that Ask Ubuntu should entertain questions related to 3rd party applications on Ubuntu, but sometimes, some issues are far from being "*fixable problems*", for example, changing ownership/privileges of files in `/etc` or `/var`. In those scenarios, backing up important data and reinstalling the OS is far less time consuming. (Contd. in next comment)
Kulfy avatar
mz flag
I'm not sure about your goal, but you should refrain from mixing repositories (Ubuntu PPAs are acceptable as long as they are from same release). If you need some packages from Parrot, it's better to find an alternative in Ubuntu or use Parrot in VM or completely replace Ubuntu with Parrot. Also, please note that PPAs are not repositories. You are using Parrot's repository, not PPA. Anyway, theoretically, the `404` problem should no longer exist since you have now run `sudo apt update` to update database of available packages.
Joel Russo avatar
cn flag
Can there be any problem if I correctly setup pin-priority for both repositories? I have changed now ubuntu from 700 to 1001. apt will always install aplications from ubuntu if they exist, only then will it even go to parrotOS repository. Is this correct or even then will it be a problem in the future?
Joel Russo avatar
cn flag
@kulfy would you be able to answer the question above? Forgot to tag.
Kulfy avatar
mz flag
@JoelRusso I can think of a hypothetical scenario. For example, a package available in Parrot's repository has "X" dependency which is available in Ubuntu's repository as well as Parrot's. In that scenario you might land into *deadlock*. In short, I can't say that by pinning priorities, no issue would occur. It depends on the situation.
Score:1
cn flag

For anyone that encounters a similar problem Solution from: diggusbickus

this is a problem of your mirror, not of your pin settings: the file is listed in the packages list, and is indeed missing from the repo

change your mirror

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.