Yum autoremove on a really old installation. Bad idea?

NethServer Version: 7.9
Module: does not matter… now.

I have a really “old” installation of NethServer, born with 7.4 and step-by step updated/upgraded via software center and yum.
Yesterday i launched yum autoremove on shell and the list of "not necessary software was… not that short. more or less 500mb of space could be retrieved consenting the package purge.
IMVHO the non-necessary packages (at least for yum) are dependencies no more requested by any of the packages currently installed on the system. Therefore, might be a nice idea to save a little more data on hard drive. But I still am linux n00b. Therefore…

Am I gonna trigger a ticking bomb if I let yum cleanup old packages?

@pike

Hi Michael

Just make sure you have a backup to be on the safe side.
A config backup would also be a good idea.

You will not lose any data…

And there should not be any issues - but that always depends on the individual server…
Eg if the HD decides to die when you’re doing yum autoremove…
A disaster recovery might take longer than expected… :slight_smile:

My 2 cents
Andy

Without a proper way to clone hard drives to a network device with XFS, still hard to have a “disaster recovery plan”. Backups of config and data currently runs smooth, but … I don’t know if dear old Veeam could be a nice addon to the install, as a “one shot disaster recovery” backpack.

Clonezilla can do that…
SystemrescueCD can also read / repair XFS - and copy the entire contents to eg a NAS…
(Or a simple DD to a network target…)

:slight_smile:

My 2 cents
Andy

Clonezilla do not run “live” with the system, if necessary…

Both do need booting from their media - USB or Disk…

Or disaster recovery restore, i agree. About create a backup instead…

If you want to make a “live” clone / backup, eg to a VM:

Install a (same) Version as running, or as close as possible.
rsync the following toplevel folders from the running machine to the clone:

/var
/usr

For safety reasons first create a clone of /etc to /AAA/etc-orig/ on the clone
rsync the running server’s /etc to /AAA/etc2/

NethServer does not use /srv, /opt and several standard top level folders. Even /home is not used.

You can still fine tune what you want, but generally this works!
I have done about 10 different P2V migrations using this method.

My 2 cents
Andy

My notes from a migration 3 years ago:

rsync -avzu -e ssh --delete /mnt/old-b/etc/ root@192.168.209.20:/AAB/etc/
rsync -avzu -e ssh --delete /mnt/old-b/root/ root@192.168.209.20:/AAB/root/
rsync -avzu -e ssh --delete /mnt/old-b/usr/ root@192.168.209.20:/usr/
rsync -avzu -e ssh --delete /mnt/old-b/srv/ root@192.168.209.20:/srv/
rsync -avzu -e ssh --delete /mnt/old-b/sys/ root@192.168.209.20:/sys/
rsync -avzu -e ssh /mnt/old-b/var/ root@192.168.209.20:/var/
rsync -avzu -e ssh --delete /mnt/old-b/var/lib/pgsql/ root@192.168.209.20:/var/lib/pgsql/
rsync -avzu -e ssh --delete /mnt/old-b/var/lib/mysql/ root@192.168.209.20:/var/lib/mysql/
rsync -avzu -e ssh --delete /mnt/old-b/var/www/ root@192.168.209.20:/var/www/
rsync -avzu -e ssh --delete /mnt/old-b/usr/share/zabbix/ root@192.168.209.20:/usr/share/zabbix/

The server was dead (PSU), the disk still usable. So using an (USB?) adapter, mounted to my workstation and rsync… :slight_smile:

As a sidenote: This server is still running, and started also with 7.1 or something as a HP Proliant ML110 G3, now as 7.9 on Proxmox…

Have very bad experiences with yum autoremove, dnf a little bit better.

(trust Debian’s apt autoremove --pruge 100% :grinning:)

When you’ll feel good about that, would you please share your experience?

On more than one occasion yum autoremove was to eager, in general this happened:

  • installing package_a pulled in package_b1 which pulled in package_b2
  • later installed package_c which also requires package_b2
  • after removing package_a and running yum autoremove it removed package_b1, package_b2 and package_c

This is the meaning of autoremove: if a package is not manually installed or requested by dependency, it will be removed. This should operate for removing unused programs and no more needed dependencies, avoiding orphan packages.
IMHVO and by nethserver perspective, if an older package is no more needed (for instance, a DBMS) should be removed and deleted…

But in my “description” did not want to get rid of manually installed package_c
So I’ll take @Andy_Wismer advise and have an backup before you do. :grinning:

keep it on your drive… 500MB that was an hard drive of 1995

I just had a server with corrupted(freshly installed .31) kernel… does this autoremove removes old kernels? If so, not a very good idea! :stuck_out_tongue:

Only those outside the value of installonly_limit.

Cheers.

My first hard drive was 270MB. Quantum one.
Anyway… why waste disk space? Thanks for your opinion :slight_smile:

1 Like

Mid 80’s mine was 20MB;
back then: whow what a disk-space how am I ever going to fill this up :question:

I like my systems nice and tidy, not because of the disk space more for avoiding unnecessary upgrades, the less you have the less can get in the way and it reduces the attack surface of the system.
So yeah get rid of what you do not need. :grinning:

:smiling_imp: User data :smiling_imp:

:joy_cat: :joy_cat: :joy_cat: :joy_cat:

2 Likes

My father bought one at the time…it was really expensive in 1988

If you do not remove some nethserver-* it should be safe