[SOLVED]Reinstall packages after a certain data

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
rlwa32
Level 1
Level 1
Posts: 32
Joined: Thu Aug 03, 2017 8:06 am

[SOLVED]Reinstall packages after a certain data

Post by rlwa32 » Wed Dec 13, 2017 1:17 pm

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?
Last edited by rlwa32 on Thu Dec 14, 2017 5:27 pm, edited 1 time in total.

Mute Ant
Level 13
Level 13
Posts: 4918
Joined: Tue Sep 03, 2013 7:45 pm

Re: Reinstall packages after a certain data

Post by Mute Ant » Wed Dec 13, 2017 8:47 pm

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)
Data stored in an encrypted volume will only be accessible with the original password. Without this key, all the data will remain scrambled beyond hope of recovery.

rlwa32
Level 1
Level 1
Posts: 32
Joined: Thu Aug 03, 2017 8:06 am

Re: Reinstall packages after a certain data

Post by rlwa32 » Thu Dec 14, 2017 6:44 am

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?

Mute Ant
Level 13
Level 13
Posts: 4918
Joined: Tue Sep 03, 2013 7:45 pm

Re: Reinstall packages after a certain data

Post by Mute Ant » Thu Dec 14, 2017 11:34 am

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.
Data stored in an encrypted volume will only be accessible with the original password. Without this key, all the data will remain scrambled beyond hope of recovery.

rlwa32
Level 1
Level 1
Posts: 32
Joined: Thu Aug 03, 2017 8:06 am

Re: Reinstall packages after a certain data

Post by rlwa32 » Thu Dec 14, 2017 5:27 pm

The re-installation of 45 packages went off without a hitch. So far, so good.

Post Reply

Return to “Software & Applications”