Results 1 to 7 of 7

Thread: Undo command

  1. #1
    Join Date
    Apr 2014
    Beans
    16

    Question Undo command

    Can anyone help me undo these commands and explain me what they do:

    Code:
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    Code:
    sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'

  2. #2
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Undo command

    AFAIK all that they do is prepare your system's package management system to install packages from www.postgresql.org - as long as you didn't go any further than that, you can undo them by editing the added line out of your /etc/apt/sources.list file and using 'apt-key del' to remove the added key.

  3. #3
    Join Date
    Apr 2014
    Beans
    16

    Re: Undo command

    how do I use the apt-key del ? do I repeat the code like this? :

    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key del -

  4. #4
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Undo command

    No, afaik you will need to run

    Code:
    apt-key list
    and look for the lines like

    Code:
    pub   4096R/ACCC4CF8 2011-10-13 [expires: 2019-07-02]
    uid                  PostgreSQL Debian Repository
    then you can do

    Code:
    sudo apt-key del ACCC4CF8
    You can check it's really gone by running 'apt-key list' a second time.

    [In this case you could have got the key-id from the ACCC4CF8.asc filename but I don't think that will always necessarily be the case.]

  5. #5
    Join Date
    Apr 2014
    Beans
    16

    Re: Undo command

    thanks although I had nothing on the list that was related to PostgreSQL. I had already erased the line in the sources.list file and then I listed the trusted keys but found nothing, so maybe is not there anymore, and maybe it was never there. Did you try it yourself?

  6. #6
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Undo command

    yes I added and then removed it just to make sure I posted the right syntax

  7. #7
    Join Date
    Apr 2014
    Beans
    16

    Re: Undo command

    thanks

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •