Page 1 of 1

[SOLVED]Reinstall packages after a certain data

Posted: Wed Dec 13, 2017 1:17 pm
by rlwa32
I recently added more memory to my LM 18.1 system and replaced a failing Nvidia card. Initially, I thought that problems that I had experienced with firefox crashes, virtual machine display issues and other virtual machine failures was due to my Nvidia drivers. However, the system also had issues unmounting and/or safely removing USB drives. I was seeing segfaults while copying files and CPU stalls at shutdown. However, after removing the new DIMMs and reverting back to the originally installed memory the problems seem to have disappeared. As a precautionary measure (and because I am fearful of file corruption) I would like to reinstall all packages that were updated by mintupdate during the period when the defective DIMMs were in the system. I know I can reinstall with apt-get but right now the only way I know how to do it is to print out a list of updates by date and do it all manually. Is there a more convenient way to have apt-get reinstall packages that were updated after a specified date?

Re: Reinstall packages after a certain data

Posted: Wed Dec 13, 2017 8:47 pm
by Mute Ant
The 'date' thing makes it difficult. It's much easier to clear the cache and re-install everything. A full Mint's worth of packages is roughly the same size as the ISO distribution.

Code: Select all

### Clear the package cache of dubious downloads...
    sudo apt-get clean
### Download a fresh set of packages...
    sudo apt-get install --reinstall -dy $(apt-mark showauto) $(apt-mark showmanual)
### Re-install everything that makes your Mint...
    sudo apt-get install --reinstall $(apt-mark showauto) $(apt-mark showmanual)

Re: Reinstall packages after a certain data

Posted: Thu Dec 14, 2017 6:44 am
by rlwa32
Mute Ant wrote:The 'date' thing makes it difficult. It's much easier to clear the cache and re-install everything. A full Mint's worth of packages is roughly the same size as the ISO distribution.

Code: Select all

### Clear the package cache of dubious downloads...
    sudo apt-get clean
### Download a fresh set of packages...
    sudo apt-get install --reinstall -dy $(apt-mark showauto) $(apt-mark showmanual)
### Re-install everything that makes your Mint...
    sudo apt-get install --reinstall $(apt-mark showauto) $(apt-mark showmanual)
Thank you for your suggestion. It got me thinking that I could use a text editor to create a file containing package names by using mintupdate's history.log file with one package name per line. Lets call it pkg.txt Then, after cleaning the package cache, I could use

Code: Select all

    sudo apt-get install --reinstall $(cat pkg.txt)
to do a more selective re-installation. What do you think?

Re: Reinstall packages after a certain data

Posted: Thu Dec 14, 2017 11:34 am
by Mute Ant
Go for it. I am a minimise-personal-effort sort of person myself. You can still use the machine while it's refreshing itself of course. Pingus is absolutely critical to the smooth operation of any machine I am using.

Re: Reinstall packages after a certain data

Posted: Thu Dec 14, 2017 5:27 pm
by rlwa32
The re-installation of 45 packages went off without a hitch. So far, so good.