3

So I installed Kali repos on Ubuntu. Bad idea btw.

They didn't work quite well so I removed them however Ubuntu thinks I'm on Kali?

Screenshot: OS info

It also broke things like software manager saying no module found "kali"

Screenshot: Python platform info

Tried dist-upgrade, upgrade, IDK what to do.

Edit for @A.B.:

$ grep -r 'kali' /etc/apt
Binary file /etc/apt/trusted.gpg matches
$


void@abyss:~$ apt-cache policy python
python:
  Installed: 2.7.9-1
  Candidate: 2.7.9-1
  Version table:
 *** 2.7.9-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status
void@abyss:~$ apt-cache policy bash
bash:
  Installed: 4.3-14ubuntu1
  Candidate: 4.3-14ubuntu1
  Version table:
 *** 4.3-14ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status
  • Do a fresh install of Ubuntu. – Pilot6 Oct 28 '15 at 20:06
  • I'd much rather not. I could've thought of doing that myself. – ThePlague Oct 28 '15 at 20:08
  • Did you do a sudo apt-get update before the upgrade commands? –  Oct 28 '15 at 20:38
  • Yes @ParanoidPanda – ThePlague Oct 28 '15 at 20:39
  • Hard to tell what packages got screwed up. Hmm... first, you could try a sudo apt-get install --reinstall base-files to reinstall central files that (among others) contain information on your OS. Beware! This might overwrite some conf files that you modified. Run dpkg -L base-files to understand what files will be overwritten. Failing all else: for pkg in $(dpkg --get-selections | awk '{print $1}'); do sudo apt-get install --reinstall $pkg; done will reinstall all packages on your system. Be sure to use --dry-run first as a sanity check, and use at your own risk. ;-) – Malte Skoruppa Oct 28 '15 at 20:39
  • What Kali repositories did you add and how (which commands)? –  Oct 28 '15 at 20:40
  • @MalteSkoruppa I'm running the for loop, base-files couldn't be reinstalled because they couldn't be downloaded. Don't worry about my sanity lmfaoo it's long gone. – ThePlague Oct 28 '15 at 20:48
  • @ParanoidPanda the basic ones I pulled from kalis online source list lmao IDK how that could have gone wrong sarcasm 18 hours in front of a computer screen makes you do stupid things and wonder "hmm wonder if this will work" didn't think it'd work well if at all, also didn't think it'd cause this much of a problem. – ThePlague Oct 28 '15 at 20:49
  • [Edit] your question and add the output of grep -r 'kali' /etc/apt – A.B. Oct 28 '15 at 20:49
  • @A.B. the sources are now disabled haha. But for you, sure. – ThePlague Oct 28 '15 at 20:49
  • You are sure a smart guy, but perhaps you should do what I say. – A.B. Oct 28 '15 at 20:51
  • @A.B. re-read what I wrote lol. Pressed enter before I finished typing... – ThePlague Oct 28 '15 at 20:52
  • @A.B. Done. Neither of em are kali – ThePlague Oct 28 '15 at 21:08
  • An other way, add the Kali repositories again. Start only sudo apt-get update no upgrades or something else. Run dpkg -l | awk '/^ii/ {print $2}' | xargs apt-cache policy \; and post the output at http://paste.ubuntu.com/ and give me the link. Remove the Kali repositories again and start sudo apt-get update. – A.B. Oct 28 '15 at 21:12
  • @A.B. I'll get to it once the command that Malte posted – ThePlague Oct 28 '15 at 21:15
  • Better not, but good luck. – A.B. Oct 28 '15 at 21:16
  • @A.B. is quite right. That loop is quite dangerous. Better to inspect what happened and take some reasonable action. dpkg -l | awk '/^ii/ {print $2}' is equivalent to dpkg --get-selections | grep -v deinstall | awk '{print $1}' (I think). Better to run the list through apt-cache policy than through sudo apt-get install --reinstall. Seriously. Stop the loop and do what the man says. ;-) – Malte Skoruppa Oct 28 '15 at 21:24
  • @A.B. From the looks of it only ndiff, nmap, python-scapy, and aircrack are from kali http://paste.ubuntu.com/12993859/ – ThePlague Oct 28 '15 at 21:45

1 Answers1

0
  1. According to the output of the command dpkg -l | awk '/^ii/ {print $2}' | xargs apt-cache policy \; you have to downgrade the Kali packages

    sudo apt-get install aircrack-ng=1:1.2-0~beta3-4 ndiff=6.47-7 nmap=6.47-7 python-scapy=2.2.0-1
    
  2. Correct the entries in /etc/lsb-release

    sudo nano /etc/lsb-release
    

    add replace the content with the lines below

    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=15.10
    DISTRIB_CODENAME=wily
    DISTRIB_DESCRIPTION="Ubuntu 15.10"
    
cl-netbox
  • 31,163
  • 7
  • 94
  • 131
A.B.
  • 90,397