Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: [SOLVED] Cancel an apt-get installation

  1. #1
    Join Date
    Jun 2007
    Location
    Michigan
    Beans
    62
    Distro
    Ubuntu 7.04 Feisty Fawn

    [SOLVED] Cancel an apt-get installation

    Hey all,

    I've searched around the forums and google for "cancel apt installation" and whatnot, and most of the posts seem to be talking about how to fix it, and tell you to dpkg --configure -a ..

    I started trying to install flash through the apt system, and I forgot that the servers never seem to work for me. I found my old .tar.gz file, and installed it, but now I'm stuck with it trying to install. Is there anyway to just tell it that I don't want to install anymore?

    Thanks,

    Katie

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Cancel an apt-get installation

    You can try running this command:
    Code:
    sudo apt-get autoclean
    and/or emptying /var/cache/apt/archives/partial
    To do that, open a file manager using the gksudo command, such as:
    Code:
    gksudo nautilus /var/cache/apt/archives/partial
    Delete the files within "partial" but not the folder itself.
    Last edited by drs305; June 28th, 2008 at 10:24 PM. Reason: expanded nautilus command

  3. #3
    Join Date
    Jun 2007
    Location
    Michigan
    Beans
    62
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Cancel an apt-get installation

    Well, the autoclean doesnt work, it said it was locked, and the partial directory was empty..

    -Thanks though
    Last edited by Tiekyl; June 28th, 2008 at 10:35 PM. Reason: Added

  4. #4
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Cancel an apt-get installation

    With an aborted tar.gz installation, do you still have the installation folder? Sometimes there is a 'postinst' folder with a removal script. Or there might be another script that would apply. If the folder exists, you could also try to rename/delete it.

    By the way, keeping installation folders after a tar.gz install is a good thing since even with a successful install it is often the only method of cleanly uninstalling an app that isn't registered with dpkg.

  5. #5
    Join Date
    Jun 2007
    Location
    Michigan
    Beans
    62
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Cancel an apt-get installation

    Sorry about the slow replys, been incessently restarting to try to fix this. It wasnt an aborted .tar.gz install though, it was through apt that I was having problems. The server just isn't responding to me.

  6. #6
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Cancel an apt-get installation

    Here's my next brainstorm, now that I understand it's a hung apt install. This may work if the entire aptitude system isn't locked. Make sure no other synaptic is running.

    First, trying the usual options:


    Code:
    sudo killall aptitude
    sudo killall synaptic
    sudo aptitude purge appname && sudo aptitude remove appname && sudo aptitude clean && sudo aptitude autoclean
    When that doesn't work
    Generate a list of installed packages and see if you can find the one you attempted to install:
    Code:
    sudo dpkg --get-selections >~/Desktop/bad-install 
    gedit ~/Desktop/bad-install
    If you find the troublemaker, check the status. Either change it to 'deinstall' or remove it completely. Then run:
    Code:
    sudo dpkg --clear-selections
    sudo dpkg --set-selections <~/Desktop/bad-install 	
    sudo apt-get -u dselect-upgrade
    Maybe that will clear it. If nothing else, it bumps your thread. Good luck.

  7. #7
    Join Date
    Jun 2007
    Location
    Michigan
    Beans
    62
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Cancel an apt-get installation

    Yay! It finally worked, thank you so much. Everything didnt work until the clearing of it out of the conf file, or whatever it was. Its re-updating now, but I'm very happy now ^_^ Thanks!

  8. #8
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Cancel an apt-get installation

    Quote Originally Posted by Tiekyl View Post
    Yay! It finally worked, thank you so much. Everything didnt work until the clearing of it out of the conf file, or whatever it was. Its re-updating now, but I'm very happy now ^_^ Thanks!
    I'm just curious - how was the app's status listed in the generated file?

    Glad you finally got this resolved.

  9. #9
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Cancel an apt-get installation

    Quote Originally Posted by Tiekyl View Post
    Everything didnt work until the clearing of it out of the conf file
    It sounds like the package was never truly purged.
    That would mean you might have fragments of the package's files on your hard drive just taking up space. If you want to get rid of them, try

    Code:
    sudo apt-get install packagename
    sudo apt-get purge packagename
    Edit: drs305, please correct me if I'm wrong. I'm not familiar with the command
    "sudo apt-get -u dselect-upgrade"
    If a package has been marked "deinstall" does it mean the package has already been deinstalled, or that it should be deinstalled if currently installed?

    If Tiekyl simply erased that line from ~/Desktop/bad-install, wouldn't "apt-get dselect-upgrade" simply do nothing? I doubt it would remove the package.
    Last edited by unutbu; June 29th, 2008 at 02:55 AM.

  10. #10
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Cancel an apt-get installation

    unbuntu,

    the problem was that the app would never complete an install. he tried, or at least i suggested, using purge but apparently it couldn't break through and get it done for some reason.

    creating a list of the current status of all packages was my last attempt at getting dpkg/apt to forget trying to complete the installation. one of the reasons i asked about what the generated list contained was that i would like to know whether it was listed as deinstall, install or something else. i am fairly certain deinstall is a status for packages awaiting removal and would probably be found by synaptic's residual config filter.

    if you run the command and then inspect the file there are very few, if any, packages marked deinstall. i constantly add and remove apps to try to figure out what's happening on other reader's computers and my list would contain dozens if not hundreds of old apps if it retained them in history.

    you are correct that the final command in the sequence would do nothing about removing the package. the solution was not a clean uninstall. your suggestion to run the install and purge was something i was going to recommend after he got all his updates completed and i did some further investigation. i just didn't have the heart to ask him to try it again so soon. i was also a bit concerned about how it would affect his install via the tar.gz installation. although dpkg wouldn't have registered that installation i wasn't sure if a fresh install/removal via apt would find and remove any of his other files.

    as for deselect-upgrade command, that is just the command i suggested to try to get apt to accurately reflect and update the status of things. since he removed a line from the generated list without going through the normal procedures i suggested this line in hopes it would reset the list to accurately reflect the status of the packages.
    Last edited by drs305; June 29th, 2008 at 03:27 AM.

Page 1 of 3 123 LastLast

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
  •