Results 1 to 9 of 9

Thread: apt-get Rolling back changes

  1. #1
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    149

    apt-get Rolling back changes

    Hi;

    I did 2-3 installs/upgrades yesterday.

    Something I did changed something that broke an application I use a lot.

    Is there way to get apt-get to rollback everything it did over the past day
    ( I don't remember everything it did )

    Steve

  2. #2
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041

    Re: apt-get Rolling back changes

    --You need to be more specific. What broke, exactly?

    --The quick-and-dirty thing to find out what was installed is to:
    ' ls -tl /var/cache/apt/archives |head ' (you can also pipe output to "less" instead of "head" if you have a lot of packages installed on the same day. You don't have to be root for this.)

    --Post the results of that command, and maybe we can try apt-get install pkgname/stable or something.

    --Usually when upgrade breaks something, Debian fixes it right away. You might try another update/upgrade a day or so after the last one, and see if it got fixed.

    --Here is a script I use for updating my boxes (don't forget to chmod +x it) - #BEGIN /root/bin/updt
    Code:
    #!/bin/sh
    apt-get update
    apt-get -u upgrade
    #debsort
    mv -f -v ~/DEBInstalled.list ~/DEBInstalled.list.prev ; \
      dpkg -l >~/DEBInstalled.list 
    updatedb &
    ##END
    --Now whenever you get packages on your system upgraded, you can ' diff ~/DEBInstalled.list.prev ~/DEBInstalled.list ' and see what changed.

    --A final note, it is a VERY good idea to start tracking what you are doing to the system. I use a file called localinfo.dat in root's home dir, and track every new package that gets installed, every pkg that gets removed, hardware upgrades, driver updates, etc. Here's an excerpt:

    Code:
    2003.0715 + Installed pkg (mplayer-686 w32codecs)
            - Removed mplayer-686 and compiled from source (not finding codec)
    ( ./configure --enable-gui --enable-largefiles --enable-vorbis --enable-xmms
    --with-win32libdir=/usr/lib/win32
    ) -- aalib support errored out.
    
            ? Installed mplayer-skin--default-1.7.tar.bz2 into
              /usr/local/share/mplayer/Skin, but it's still not finding
              the win32 dlls.
            ! This is getting old REALLY fast.
            + Installed mplayer--qt6dlls.tar.bz2, mplayer--qtextras.tar.bz2
    
            + :) Now it works - but it keeps crashing at the end of QT videos. :(
    
            ++ Changed proftpd.conf for better security (ServerIdent.)
    
    2003.0805 - Removed proftpd (conf file changed)
            + Installed pkg vsftpd
            + Restored /etc/ftpusers file (deleted when proftpd went)
            + Updated stopsvcs
    
            + Installed pkg bittorrent
    
    2003.0817 + Renamed .xinitrc to .xinitrc-manual and updated .bashrc,
            since the way it was had broken plain startx
    
            + VNC on this box works diff than p233 - the ~/.vncrc is used here.
    
            + Updated NVIDIA driver to 4496.
    
    2003.0821 + Installed mozilla-browser-snapshot with synaptic
            + Installed pkg aptitude
    Quote Originally Posted by beforewisdom
    Hi;

    I did 2-3 installs/upgrades yesterday.

    Something I did changed something that broke an application I use a lot.

    Is there way to get apt-get to rollback everything it did over the past day
    ( I don't remember everything it did )

    Steve

  3. #3
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    149

    Re: apt-get Rolling back changes

    Quote Originally Posted by Dave_Bechtel
    --You need to be more specific. What broke, exactly?
    Excellent point.

    I used apt-get to upgrade icewm from 1.2.7 to 1.2.11. In the process it looked like upgraded some C libraries ( next time I will pay attention ) and prompted me for a bunch of preferences. It looked like most were for icewm, but I am not sure.

    After the upgrade when I would go run Visual SlickEdit ( an editor ) I would get Segment Fault messages.

    Steve

  4. #4
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872

    Re: apt-get Rolling back changes

    Quote Originally Posted by beforewisdom
    Quote Originally Posted by Dave_Bechtel
    --You need to be more specific. What broke, exactly?
    Excellent point.

    I used apt-get to upgrade icewm from 1.2.7 to 1.2.11. In the process it looked like upgraded some C libraries ( next time I will pay attention ) and prompted me for a bunch of preferences. It looked like most were for icewm, but I am not sure.

    After the upgrade when I would go run Visual SlickEdit ( an editor ) I would get Segment Fault messages.

    Steve
    Chances are you hit the limitation of dpkg/apt-get and may not be able to do what you want. I have come across similar scenario before like the following :

    I need to install a newer package that needs libc6(the core of the whole GNU tool set and almost everything) which would upgrade from 2.2.5(woody) to 2.3.1(sid/sarge). Once this is done, there is no way it can go back to 2.2.5 as apt-get would remove almost everything(including dpkg/apt-get itself) that use this libc6.

    I don't know what your affected packages is but if it is some library(most likely) it is not easy. the only thing I can think of is to do a :

    1. dpkg --get-selection > current
    2. don't include the source repository that 'upgrade' your affected package
    3. dpkg --set-selection < current
    4. apt-get dist-upgrade

    and hopefully it would restore the whole thing, but I am not sure given the design of dpkg.

  5. #5
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041

    Re: apt-get Rolling back changes

    --Have you tried seeing if there's a later version of visual slickedit?

    Quote Originally Posted by beforewisdom
    Quote Originally Posted by Dave_Bechtel
    --You need to be more specific. What broke, exactly?
    Excellent point.

    I used apt-get to upgrade icewm from 1.2.7 to 1.2.11. In the process it looked like upgraded some C libraries ( next time I will pay attention ) and prompted me for a bunch of preferences. It looked like most were for icewm, but I am not sure.

    After the upgrade when I would go run Visual SlickEdit ( an editor ) I would get Segment Fault messages.

    Steve

  6. #6
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    149

    Re: apt-get Rolling back changes

    Quote Originally Posted by Dave_Bechtel
    --Have you tried seeing if there's a later version of visual slickedit?
    There is, but I don't want to shell out the money for an upgrade until I can see if I can fix my system and if an upgrade will solve the problem.

    Yes, I have done the free of charge editors. Emacs used to be my life.

    Steve

  7. #7
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    149

    Re: apt-get Rolling back changes

    Quote Originally Posted by Dave_Bechtel
    --You need to be more specific. What broke, exactly?

    --The quick-and-dirty thing to find out what was installed is to:
    ' ls -tl /var/cache/apt/archives |head ' (you can also pipe output to "less" instead of "head" if you have a lot of packages installed on the same day. You don't have to be root for this.)]
    The dates are a bit off, I think because I had soem clock issues that I did not bother to fix.

    The libs listed look familiar. apt-get got them for me when I upgraded to icewm 1.2.11 out of unstable( I down graded icewm back to icewm 1.2.7 which I found in test ).


    Should dpkg _P these libraries and install the version from test or will I be getting myself into more hot water?

    Steve


    total 43736
    drwxr-xr-x 2 root root 4096 Aug 24 10:08 partial
    -rw-r----- 1 root root 0 Aug 24 10:06 lock
    -rw-r--r-- 1 root root 299710 Aug 20 10:02 icewm-common_1.2.11-1_i386.deb
    -rw-r--r-- 1 root root 397238 Aug 20 10:02 icewm_1.2.11-1_i386.deb
    -rw-r--r-- 1 root root 2574446 Aug 19 16:02 libc6-dev_2.3.2-3_i386.deb
    -rw-r--r-- 1 root root 3602448 Aug 19 16:02 libc6_2.3.2-3_i386.deb
    -rw-r--r-- 1 root root 3784782 Aug 19 16:02 locales_2.3.2-3_all.deb

  8. #8
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    149
    I found my own answer:

    1. get the name of the previous package
    2. use an '=' in place of space in the package name
    3. put the package name in a normal apt-get install command:

    $ apt-get install libc6=2.2

    I was able to roll stuff back and get my editor working without paying for an upgrade

    Steve

  9. #9
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041
    --That's cool; I have to remember that for next time. You should go into ' aptitude ' and put a Hold on the packages that broke before so they don't get upgraded again.

    Quote Originally Posted by beforewisdom
    I found my own answer:

    1. get the name of the previous package
    2. use an '=' in place of space in the package name
    3. put the package name in a normal apt-get install command:

    $ apt-get install libc6=2.2

    I was able to roll stuff back and get my editor working without paying for an upgrade

    Steve

Similar Threads

  1. I'm Back...
    By chris-harry in forum The Lounge
    Replies: 5
    Last Post: 11-30-2004, 05:35 AM
  2. How to get Alt-F2 back?
    By Craig2 in forum General Support
    Replies: 0
    Last Post: 04-12-2004, 02:22 PM
  3. How can I stop screen from rolling after boot?
    By rfarmer in forum General Support
    Replies: 2
    Last Post: 01-30-2004, 01:22 AM
  4. 9/05/03 too many broken things, rolling back to 4/5/03
    By beforewisdom in forum Hardware & Booting
    Replies: 2
    Last Post: 09-18-2003, 02:17 AM
  5. apt-get rolling back configurations
    By beforewisdom in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 08-24-2003, 09:16 AM

Posting Permissions

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


A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G

$13.99



HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM picture

HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM

$9.64



A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L picture

A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L

$27.98



A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G picture

A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G

$13.99



CRUCIAL DDR3L 8GB 16GB 32GB 1600 MHz PC3-12800 Laptop Memory RAM SODIMM 204-Pin picture

CRUCIAL DDR3L 8GB 16GB 32GB 1600 MHz PC3-12800 Laptop Memory RAM SODIMM 204-Pin

$14.35



HMT84GL7AMR4C-RD 32GB DDR3 Server Memory RAM 14900L ECC REG 4Rx4 SK Hynix Cisco picture

HMT84GL7AMR4C-RD 32GB DDR3 Server Memory RAM 14900L ECC REG 4Rx4 SK Hynix Cisco

$13.99



A-Tech 16GB 2x 8GB PC3-12800 Desktop DDR3 1600 MHz 240pin DIMM Memory RAM 16G 8G picture

A-Tech 16GB 2x 8GB PC3-12800 Desktop DDR3 1600 MHz 240pin DIMM Memory RAM 16G 8G

$27.98



Crucial  DDR3 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3L 16G DDR3L picture

Crucial DDR3 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3L 16G DDR3L

$21.95



Hynix 64GB 4Rx4 PC4-2133P-L LRDIMM DDR4-17000 ECC Load Reduced Server Memory RAM picture

Hynix 64GB 4Rx4 PC4-2133P-L LRDIMM DDR4-17000 ECC Load Reduced Server Memory RAM

$64.99



A-Tech 64GB 4x 16GB 2Rx4 PC4-19200R DDR4 2400MHz ECC REG RDIMM Server Memory RAM picture

A-Tech 64GB 4x 16GB 2Rx4 PC4-19200R DDR4 2400MHz ECC REG RDIMM Server Memory RAM

$87.96