5

This is on Ubuntu 14.04 (SERVER, so no GUI)

Ok so earlier today I was asked to upgrade GCC to GCC 4.9 (current available is GCC 4.8 for Trusty).

So following these directions I installed the PPA ubuntu-toolchain-r/test. Well, turned out we did not need GCC 4.9 and I wanted to revert back to 4.8. So I followed these instructions and I:

Used ppa-purge tool:

sudo ppa-purge ppa:ubuntu-toolchain-r/test

I removed the repository with --remove

sudo apt-add-repository --remove ppa:ubuntu-toolchain-r/test

And manually removed the PPA file from /etc/apt/sources.list.d as well as the keyring.

But now, whenever I run

sudo apt-get upgrade

It's still asking me to upgrade GCC to 4.9 (and several other toolchain related packages.)

6
  • Just to clarify 2 thing: 1 this is a headless server. No GUI 2 I do not want ppa:ubuntu-toolchain-r/test to be involved in the server at all anymore. I want it and everything related to it to go away. I cant make it go away. Reboot didnt help
    – tucstwo
    May 27 '15 at 3:50
  • Just like pointed in how-can-ppas-be-removed " This is almost as logical as clicking a "Start" button in order to shutdown. – Gauthier Sep 1 '14 at 20:49 " The accepted answer is incorrect.
    – xangua
    May 27 '15 at 3:59
  • Thanks for your help. I followed the "click start button" commands line by line in the old answer I referenced. It didn't solve my issue. I did these steps
    – tucstwo
    May 27 '15 at 4:03
  • 1
    Before you ran sudo apt-get upgrade did you run sudo apt-get update? May 27 '15 at 4:35
  • 1
    Possible duplicate of How can I remove gpg key that I added using apt-key add -?
    – MadMike
    Jun 13 '16 at 12:43
6

All of what you did is just right. But you miss to do one important thing.

sudo ppa-purge ppa:ubuntu-toolchain-r/test


sudo apt-add-repository --remove ppa:ubuntu-toolchain-r/test

And manually removed the PPA file from /etc/apt/sources.list.d as well as the keyring.

Now before doing

sudo apt-get upgrade

you should make

sudo apt-get update

then make

sudo apt-get upgrade

Your problem is you are still working on the software list that containing that repository, so you have to do apt-get update to update this list without the ubuntu-toolchain-r/test repository.

1
  • How to manually remove the keyring?
    – Abdull
    Feb 14 '18 at 18:03
-1

The first command will only disable the PPA, not actually remove and install the original packages from Ubuntu repository:

sudo apt-add-repository --remove ppa:ubuntu-toolchain-r/test

So you'll need to enable the Repository one more time, go to Software Center > Edit menu > Sources, and run ppa-purge first.

sudo ppa-purge ppa:ubuntu-toolchain-r/test

7
  • I'm Sorry, 2 things: 1 this is a headless server. No GUI 2 I do not want ppa:ubuntu-toolchain-r/test to be involved in the server at all. I want it and everything related to it to go away.
    – tucstwo
    May 27 '15 at 3:49
  • I'm just pointing out the only thing you did was disable the repository, not actually "remove" it like the commang suggest or rollback to the packages from the official Ubuntu repository. If you did not install anything from this repository, did you run apt-get update before disabling it?
    – xangua
    May 27 '15 at 3:52
  • If you re-read my original question, I have done all of the steps in your answer.
    – tucstwo
    May 27 '15 at 3:55
  • you can see the output here from your answer hastebin.com/popevacipi.rb
    – tucstwo
    May 27 '15 at 3:58
  • and yes, I've run sudo apt-get update at every imaginable interval in this process
    – tucstwo
    May 27 '15 at 3:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.