Prerequisites
Before rolling back, make sure you have:
- SSH access to your VPS
- Root or sudo privileges
- Snapshot or backup taken before upgrade
Method 1: Restore from Hostxpeed Snapshot (Recommended)
If you took a snapshot before upgrading:
- Log in to Hostxpeed Client Area
- Go to My Services → Your VPS
- Find Snapshots section
- Select the snapshot taken before upgrade
- Click Restore
Method 2: Downgrade Specific Package (APT)
sudo apt install package_name=previous_version
To see available versions:
apt-cache policy package_name
Method 3: Hold a Package to Prevent Future Upgrades
sudo apt-mark hold package_name
Unhold:
sudo apt-mark unhold package_name
Method 4: Revert Kernel Upgrade
Select previous kernel in GRUB boot menu, then remove problematic kernel:
dpkg --list | grep linux-image
sudo apt remove linux-image-5.x.x-xx-generic
Method 5: Use apt-get install --reinstall
sudo apt-get install --reinstall package_name=previous_version
Method 6: Restore from File Backup
If you have file backups, restore critical directories:
rsync -avz /backup/etc/ /etc/
rsync -avz /backup/var/www/ /var/www/
✅ Rollback performed. Verify system functionality after restoration.