Results 1 to 9 of 9

Thread: How do I prevent an installed deb package from being upgraded?

  1. #1
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,437
    Distro
    Xubuntu

    Question How do I prevent an installed deb package from being upgraded?

    Hi.
    How do I prevent an installed deb package from being upgraded in Ubuntu?
    I refer to Vice 2.1.deb
    I know the Synaptic version is also 2.1 but it wont work. I remove .vice from my home folder and completely remove vice in synaptic.
    Then I install Vice 2.1.deb and all works perfectly.

    I locked the Vice 2.1.deb vice in Synaptic but when I do update and upgrade it still wants to upgrade vice.

    I think the lock feature may only work on native packages. Please someone correct me if I am wrong on that.

    Anyone?
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  2. #2
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,635
    Distro
    Ubuntu

    Re: How do I prevent an installed deb package from being upgraded?

    Try
    Code:
    sudo -s
    Code:
    echo package-name hold | dpkg --set-selections
    Code:
    sudo apt-get update && sudo apt-get upgrade

  3. #3
    Join Date
    Dec 2007
    Location
    Shepperton, UK.
    Beans
    2,489
    Distro
    Ubuntu Development Release

    Re: How do I prevent an installed deb package from being upgraded?

    Please take a look at apt_preferences in terminal with
    Code:
    man apt_preferences
    Please post back your results as I've never tried this.
    Beaten to it (see post above).
    Intel E5700 G41 8Gb Xubuntu 13.10, Ubuntu 13.4, WinXP.
    Revo R3610 Win7 Pro, Ubuntu 13.04

    Absolute Beginners Compiz-fusion wiki Local Weather

  4. #4
    Join Date
    Mar 2008
    Location
    Liverpool, United Kingdom
    Beans
    1,666
    Distro
    Ubuntu Development Release

    Wink Re: How do I prevent an installed deb package from being upgraded?

    Quote Originally Posted by Rytron View Post
    Hi.
    How do I prevent an installed deb package from being upgraded in Ubuntu?
    I refer to Vice 2.1.deb
    I know the Synaptic version is also 2.1 but it wont work. I remove .vice from my home folder and completely remove vice in synaptic.
    Then I install Vice 2.1.deb and all works perfectly.

    I locked the Vice 2.1.deb vice in Synaptic but when I do update and upgrade it still wants to upgrade vice.

    I think the lock feature may only work on native packages. Please someone correct me if I am wrong on that.

    Anyone?
    In Synaptic Package Manager, search for the software that you don't want to be upgraded, select it & go to Package & then check the box Lock Version

  5. #5
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,437
    Distro
    Xubuntu

    Exclamation Re: How do I prevent an installed deb package from being upgraded?

    Quote Originally Posted by scouser73 View Post
    In Synaptic Package Manager, search for the software that you don't want to be upgraded, select it & go to Package & then check the box Lock Version
    I tried that. That may only work for native packages.
    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  6. #6
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,437
    Distro
    Xubuntu

    Talking Re: How do I prevent an installed deb package from being upgraded?

    Quote Originally Posted by nothingspecial View Post
    Try
    Code:
    sudo -s
    Code:
    echo package-name hold | dpkg --set-selections
    Code:
    sudo apt-get update && sudo apt-get upgrade
    Excellent nothingspecial. Your solution did the trick.

    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  7. #7
    Join Date
    Dec 2007
    Location
    Science Station Hermes
    Beans
    611
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How do I prevent an installed deb package from being upgraded?

    You shouldn't use sudo -s because it retains your user's environment variables. Use sudo -i.
    Quote Originally Posted by Legendary_Bibo View Post
    I tried, and by tried I mean I did a half a**ed google search, and by half a**ed google search I mean I typed "eread pdg"

  8. #8
    Join Date
    Feb 2008
    Location
    Munster, Ireland
    Beans
    2,437
    Distro
    Xubuntu

    Re: How do I prevent an installed deb package from being upgraded?

    Quote Originally Posted by alphaniner View Post
    You shouldn't use sudo -s because it retains your user's environment variables. Use sudo -i.
    Thanks for the tip alphaniner.

    1st Distro used (live CD): Knoppix in early 2007 ¦ 1st Distro Installed: Ubuntu 7.10 in Feb 2008
    GNU/Linux User #470660 – Ubuntu User #28226
    Isaac Asimov: "I do not fear computers. I fear the lack of them."

  9. #9
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,635
    Distro
    Ubuntu

    Re: How do I prevent an installed deb package from being upgraded?

    Quote Originally Posted by alphaniner View Post
    You shouldn't use sudo -s because it retains your user's environment variables. Use sudo -i.
    Educate me

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
  •