How to remove MySql apt repo

12,699

Solution 1

So I added a MySql apt from the link Steps to fresh install MySql

When those are really the steps that you followed, then this is your solution.

Open a terminal and run this command if you want to remove all configurations:

sudo apt-get purge mysql-apt-config

Otherwise, this command is sufficient:

sudo apt-get remove mysql-apt-config

Solution 2

I found that /etc/apt/sources.list.d/mysql.list had all the references to mysql repositories:

pi@raspberrypi:~ $ find /etc/apt/ -type f | xargs grep "repo.mysql.com"
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/debian/ stretch mysql-apt-config
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/debian/ stretch mysql-5.7
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/debian/ stretch mysql-tools
/etc/apt/sources.list.d/mysql.list:#deb http://repo.mysql.com/apt/debian/ stretch mysql-tools-preview
/etc/apt/sources.list.d/mysql.list:deb-src http://repo.mysql.com/apt/debian/ stretch mysql-5.7

So I decided to remove the mysql.list i the /etc/apt/sources.list.d directory and finaly sudo apt-get update does not come with mysql repositories

Thanks every one here

Share:
12,699

Related videos on Youtube

neo.one
Author by

neo.one

Updated on September 18, 2022

Comments

  • neo.one
    neo.one almost 2 years

    I was trying to install MySql on my system running Ubuntu 14.04. So I added a MySql apt from the link Steps to fresh install MySql.
    After running into a lot of trouble and realizing apt uses libs not supported by Ubuntu 14.04, I was advised to remove the apt and use Ubuntu repo to install mysql.

    However, it seems I can't find how to remove the above mentioned apt repo. I've been through some of the stuff I can find on the community but still no solution that worked for me! Software center shows this.

    Tried using dpkg, aptitude -remove also from software center but looks like I've hit a wall.
    So any help is appreciated.

    • Admin
      Admin about 9 years
      have you tried sudo apt-get purge mysql* and remove /etc/apt/sources.list and do sudo apt-get update again.
    • Admin
      Admin about 9 years
      @mnstalemate "remove /etc/apt/sources.list" ? Why that?
    • Admin
      Admin about 9 years
      Yes, I did that, though I used 'mysql*' as the reg exp, just to be safe.
    • Admin
      Admin about 9 years
      @A.B so that when you update your repositories again, you won't have any manually added repos in the sources.list file.
    • Admin
      Admin about 9 years
      @mnstalemate So, wouldn't that affect other manually added repos?
    • Admin
      Admin about 9 years
      Yes. it will delete added repos. But you always can sudo apt-get update and then manually add repos you want. This, kind of refreshes the sources.list file.
    • Admin
      Admin about 9 years
      okay, tried that again, and it worked.. Thank you @mnstalemate However, some packages were still present, extremely persistent they were, used synaptic to remove those.
  • neo.one
    neo.one about 9 years
    Done, no success.
  • A.B.
    A.B. about 9 years
    @neo.one The repository is still displayed in Synaptic?
  • neo.one
    neo.one about 9 years
    Yes, it is displayed in Synaptic
  • A.B.
    A.B. about 9 years
    Execute this command and write the output into your question: find /etc/apt/ -type f | xargs grep "repo.mysql.com"
  • Ruberandinda Patience
    Ruberandinda Patience almost 6 years
    I posted as new answer because of reputation sorry
  • terdon
    terdon almost 6 years
    Why is this not an answer? The last line is what the OP did to solve the issue.