Use the recovery tool that matches the scope of the mistake: Git for committed application or configuration files, APT history for a recent package transaction, an Ubuntu archive snapshot when you need packages as they existed at a known time, and a backup or provider snapshot when data, boot files, or several services are damaged. Do not begin by guessing a command. Record what changed, preserve the current state, and identify the smallest layer that contains the fault.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Choose the smallest recovery layer that can fix the problem
Undoing a change is not one operation on a VPS. A Git commit, an APT transaction, a package version, a database, and the complete filesystem are different recovery layers. Selecting a broader tool than necessary increases downtime and can overwrite useful evidence; selecting a narrower tool leaves the actual damage in place.
As an Amazon Associate I earn from qualifying purchases.
| Method | Best scope | History and reversibility | Dependency awareness | Application data included? | Main risk |
|---|---|---|---|---|---|
| Git revert | One or more published commits containing tracked code or configuration | Adds a new commit, preserving the existing history; easy to review and reverse again | Git understands file changes, not package or runtime dependencies | No; databases, uploads and generated state remain unchanged | The old commit may no longer apply cleanly if later edits changed the same lines |
| Git reset | A private branch that must point at an earlier commit | Moves HEAD; soft and mixed modes preserve different amounts of work, while hard mode rewrites tracked files |
Only repository state | No | --hard can overwrite work and remove tracked paths absent from the target |
| APT history undo or rollback | A recent package transaction on a release and APT version that support history management | APT performs another package operation; inspect the planned changes first | APT resolves package relationships, but it does not restore arbitrary service data | Normally no; package configuration files and databases may still contain later changes | Commands are version-dependent and a downgrade can create dependency or security problems |
| APT archive snapshot | Installing packages from a known Ubuntu archive state | Reproduces package availability at a UTC timestamp; it is not a complete server restore | APT resolves against the selected archive, subject to repository metadata | No | An old package can lack security fixes or conflict with current packages |
| Backup or provider snapshot | Filesystem, boot, database, multi-service, or whole-instance damage | Restores a captured system state; retain the damaged instance when possible | Depends on the backup and application restore procedure | Only what the backup actually captured | Restoring the wrong point can lose newer data; a snapshot that was never tested may not be usable |
Prepare the VPS before attempting an undo
If the server is still readable, spend a few minutes preserving information. A failed rollback is easier to diagnose when you can compare the pre-rollback state with the result.
- Write down the symptom and time. Note the first failing request, affected service, deploy or maintenance window, and the exact command or automation job that ran.
- Capture current evidence. Save relevant service status, recent logs, package versions, Git status and the shell history. Copy logs to a separate location if the disk may be failing.
- Make a fresh backup when the system is consistent. Do not overwrite the only known-good backup with a capture made after corruption.
- Classify the change. Decide whether it is an uncommitted file edit, a committed repository change, a package transaction, a package-version regression, application data, or broad filesystem damage.
- Confirm the platform. Record the exact Ubuntu or Debian release and the installed APT version. A command documented for Ubuntu 25.10 may not exist on an older release.
- Reduce additional writes. Stop an affected deployment or worker before restoring files. For a database, use its normal maintenance or dump procedure rather than copying live database files.
Undo a committed application or configuration change with Git
Inspect the repository and identify a target
Start in the deployment checkout and make the target explicit:
#1 Best Overall
- Slim durable design to help take your important files with you
- Vast capacities up to 6TB[1] to store your photos, videos, music, important documents and more
- Back up smarter with included device management software[2] with defense against ransomware
- Help secure your important files with password protection and hardware encryption
- 3-year limited warranty
git status
git log --oneline --decorate -n 20
git diff
A clean working tree makes the result predictable. If git status shows unrelated edits, preserve them separately or stop before using a destructive mode. Identify the commit that introduced the fault and the commit or tag known to be good. Use the full or an unambiguous abbreviated object ID, not a moving branch name whose tip may change during recovery.
Prefer git revert for a published commit
For a commit already pushed or deployed, create a reversal commit:
Recommended Free Tools
git switch production
git pull --ff-only
git revert <bad-commit>
git push origin production
git revert applies the inverse of the selected patch and records that inverse as a new commit. The original commit remains visible, so reviewers can see what happened and another revert can be made if the diagnosis was wrong. Resolve any conflict in the normal way, run the project’s checks, and complete the revert with the commit message Git prepares. Reverting several commits may require selecting them in an order that leaves the working tree coherent; inspect the diff after each significant step.
A revert changes tracked files only. It does not roll back a database migration, delete an uploaded asset, restore an environment variable stored outside the repository, or undo a package installation. Pair the code revert with the application-specific data procedure when the release changed those layers.
Restore only selected files
When one configuration file or directory is wrong but the rest of the commit is needed, restore paths from a known commit:
git restore --source=<known-good-commit> -- path/to/file path/to/directory
Review git diff, run the configuration validator for the affected service, and commit the deliberate file-level repair. This avoids reversing unrelated features, but it also means you must understand dependencies between the selected paths.
Rank #2
- Capacity Display Variance: 500GB external ssd often appears as around 465GB on Windows. MacOS can show full 500 GB capacity. This is binary calculation difference and doesn’t affect SSD hard drive actual physical storage
- 1050 MB/s Speed: Instantly access to your files with blazing-fast 10Gbps external SSD read up to 1050MB/s and write up to 1000MB/s. LED Light indicates USB SSD instant activity
- Data Security: Solid state drives S.M.A.R.T. health diagnostics and adaptive TRIM optimizing data block management ensures consistent write speeds and extends the longevity of the portable SSD
- USB-C & USB-A Cable: Both cables featuring rapid USB 3.2 Gen2, this USB SSD effortlessly bridges devices, enabling seamless cross-platform file transfers and backup between computers, smartphones, tablets and iPhone
- Always Fast: No slowdowns for large file transfers. With SLC caching (25% of current available capacity allocated as high-speed cache), this external SSD delivers steady 10Gbps for transfers within the cache capacity
Use reset only when rewriting a private branch
Reset moves the branch name and can change the index and working tree:
git reset --soft <commit>movesHEADwhile leaving changes staged.git reset --mixed <commit>movesHEADand leaves the differences in the working tree, unstaged; this is the default reset mode.git reset --hard <commit>makes tracked files match the target and can remove tracked paths that are absent there.
Create a safety branch before any reset and verify that the working tree contains nothing you need:
git branch recovery-before-reset
git status
git log --oneline --decorate -n 10
git reset --hard <known-good-commit>
Do not use a hard reset on a shared branch merely to make the remote look older. It rewrites history and forces collaborators or deployment systems to reconcile divergent references. If a private branch has already been pushed, coordinate the force update policy instead of assuming it is safe.
Validate the Git recovery
- Run syntax checks, unit tests and the application’s build step.
- Validate service configuration before restarting; for example, use the service’s own config-test command where available.
- Restart only the affected service, then inspect its status and logs.
- Exercise a representative request, background job and health check.
- Record the recovery commit and the remaining differences so the next deploy does not reintroduce the fault.
Undo a recent package transaction with APT history
Check whether the feature exists
Ubuntu documents APT history management as added in version 25.10. On a qualifying installation, list transactions and inspect one before changing anything:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallapt --version
apt history-list
apt history-info <ID>
Use the transaction ID shown by your system. The information view is the point to confirm which packages were installed, upgraded or removed and whether the transaction matches the incident. If these subcommands are unavailable, do not substitute an invented syntax; use the log and repository fallback described below.
Undo one transaction or roll back later transactions
After reviewing the plan, the documented operations are:
Rank #3
- 【Plug-and-Play Expandability】 With no software to install, just plug it in and the drive is ready to use in Windows(For Mac,first format the drive and select the ExFat format.
- 【Fast Data Transfers 】The external hard drives with the USB 3.0 cable to provide super fast transfer speed. The theoretical read speed is as high as 110MB/s-133MB/s, and the write speed is as high as 103MB/s.
- 【High capacity in a small enclosure 】The small, lightweight design offers up to 500GB capacity, offering ample space for storing large files, multimedia content, and backups with ease. Weighing only 0.35 Lbs, it's easy to carry "
- 【Wide Compatibility】Supports PS4 5/xbox one/Windows/Linux/Mac and other operating systems, ensuring seamless integration with game consoles,various laptops and desktops .
- Important Notes for PS/Xbox Gaming Devices: You can play last-gen games (PS4 / Xbox One) directly from an external hard drive. However, to play current-gen games (PS5 / Xbox Series X|S), you must copy them to the console's internal SSD first. The external drive is great for keeping your library on hand, but it can't run the new games.
sudo apt history-undo <ID>
sudo apt history-redo <ID>
sudo apt history-rollback <ID>
history-undo asks APT to reverse the changes associated with one transaction. history-redo reapplies a transaction. history-rollback removes changes after the selected transaction, so choosing the ID is consequential: it can encompass multiple later operations. Read APT’s proposed package changes and stop if it wants to remove essential services or perform an unexpected downgrade. Keep console access available because a package operation can affect networking, SSH, kernels or the service you use to administer the VPS.
APT history is a package operation, not a time machine. It does not restore a database to the earlier contents, delete generated files, reverse a manual edit in /etc, or recover an uploaded asset. Configuration files may also be kept or merged according to package-maintainer rules rather than restored byte-for-byte.
Free tools Windows power users keep installed
One-click scans. No signup required.
Fallback when APT history commands are missing
Inspect the recorded transactions:
sudo less /var/log/apt/history.log
sudo zgrep -hE 'Commandline|Install|Upgrade|Remove|Purge' /var/log/apt/history.log*
Identify the package and the previous version from the logs and from the repositories available to the release. Check the candidate and installed versions before attempting a downgrade. A package version that is no longer published cannot be installed from ordinary repositories; forcing an unrelated version can break dependencies. Take a backup, test the operation on a disposable instance when possible, and keep a recovery console or provider snapshot.
Use Ubuntu archive snapshots to obtain an earlier package state
An archive snapshot selects package metadata from a specific point in time. Ubuntu documents snapshot IDs in UTC format: YYYYMMDDTHHMMSSZ. For example, the trailing Z indicates UTC, not the VPS local timezone.
Check release support and the snapshot
Ubuntu 24.04 and later can detect snapshots automatically. Supported older releases need the appropriate source configuration and a minimum APT version, so verify the release documentation and installed APT before changing repository definitions. Typical documented operations include:
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →sudo apt update --snapshot <YYYYMMDDTHHMMSSZ>
apt policy <PACKAGE> --snapshot <YYYYMMDDTHHMMSSZ>
sudo apt install <PACKAGE> --update --snapshot <YYYYMMDDTHHMMSSZ>
Use the snapshot to reproduce or troubleshoot a package regression, not as proof that the entire VPS can be restored. Check that all required packages are available in the selected archive and that the resulting dependency plan is coherent. Return repository configuration to the normal current archive after the controlled test or installation.
Rank #4
- Capacity Display Variance: 1TB external ssd often appears as around 931GB on Windows. MacOS can show full 1 TB capacity. This is binary calculation difference and doesn’t affect SSD hard drive actual physical storage
- 1050 MB/s Speed: Instantly access to your files with blazing-fast 10Gbps external SSD read up to 1050MB/s and write up to 1000MB/s. LED Light indicates USB SSD instant activity
- Data Security: Solid state drives S.M.A.R.T. health diagnostics and adaptive TRIM optimizing data block management ensures consistent write speeds and extends the longevity of the portable SSD
- USB-C & USB-A Cable: Both cables featuring rapid USB 3.2 Gen2, this USB SSD effortlessly bridges devices, enabling seamless cross-platform file transfers and backup between computers, smartphones, tablets and iPhone
- Always Fast: No slowdowns for large file transfers. With SLC caching (25% of current available capacity allocated as high-speed cache), this external SSD delivers steady 10Gbps for transfers within the cache capacity
Check security before installing an older package
A snapshot can contain a package before a vulnerability fix was published. Compare the candidate with the security pocket and confirm the vulnerability status for the specific release and package. If you must run an older build temporarily, isolate the service, restrict exposure, document the exception and schedule an upgrade to a fixed version. Never treat an old archive as a permanent security baseline.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Restore broad damage from backups or a provider snapshot
Decide what the backup actually contains
A backup plan should state what is backed up, how often, where copies are stored and how restoration works. A provider disk snapshot may capture a volume at one instant; a database dump captures logical records; a file backup may omit boot metadata, sockets, caches or unlisted mount points. Inventory the backup before selecting it as the recovery point.
Restore to separate infrastructure first
When the provider permits it, attach the snapshot to a new instance or restore it to a separate volume. Keep the damaged VPS powered down or unchanged so you can extract a missing file and compare logs. Confirm the restored system boots, mounts expected volumes, has the right network identity and contains the required application and configuration files before switching traffic.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Restore databases with database-aware tools
Use a dump and restore procedure supported by the database engine, including users, permissions, extensions and consistency checks. Copying live database files from a snapshot can produce an unusable or crash-recovered instance if writes were in progress. After restoring, run integrity checks and verify application migrations before allowing writes.
Switch service traffic deliberately
- Install security updates that are compatible with the restored application, unless a documented package regression requires a temporary hold.
- Restore secrets and external integrations from their protected source; do not assume they were present in the disk image.
- Start dependencies in order and inspect logs for each service.
- Run health checks, login flows, background jobs and a representative read-only transaction.
- Change DNS, a load-balancer target or provider address only after validation, and retain the old instance for the agreed rollback window.
Keep redundant and off-site copies
Ubuntu recommends redundant copies and identifies networked incremental tools such as Bacula, periodic local or remote SSH snapshots such as rsnapshot, and etckeeper for versioning /etc. Removable media can be useful, but keep at least one important copy off-site. A backup stored only on the same VPS disappears with the VPS, disk or account failure.
A layered recovery workflow for a failed deploy
- Freeze the incident. Stop the deployment and record time, symptoms, logs and current versions.
- Protect the current state. Capture a snapshot or backup and create a Git branch such as
incident-current-stateif the checkout is available. - Try the narrowest safe fix. Revert the bad commit if code is the cause; do not roll back packages merely because the deploy failed.
- Separate package symptoms from data symptoms. If a library upgrade broke startup, inspect APT history and package versions. If records or uploads are wrong, use application-aware backups.
- Use a package snapshot only for package availability. Confirm security and dependency consequences before installing an older build.
- Escalate to a full restore. Choose a provider or backup recovery point when boot, filesystem, several services or irreplaceable data are affected.
- Validate and document. Test the recovered service, record exact commands and preserve the failed state until evidence is no longer needed.
Common failure modes and safer responses
- The Git revert conflicts. Stop, inspect both sides, resolve only the intended paths, run tests and commit the resolved revert. Do not replace the whole file blindly.
- Hard reset erased local work. Check reflog and the safety branch before running cleanup commands; avoid garbage-collection operations while recovery is in progress.
- APT proposes removal of critical packages. Cancel, inspect the dependency plan and restore from a snapshot or backup rather than accepting an unsafe downgrade.
- The history command is unknown. Confirm release and APT version, then use APT logs and a supported repository or snapshot mechanism.
- The package is fixed but the application is still broken. Check database schema, environment files, generated assets, permissions and service state; package rollback does not undo those layers.
- The restored VPS boots but data is stale. The selected backup predates the latest writes. Keep the original instance, export newer records if they are consistent, and reconcile them with the restored copy.
- SSH fails after a rollback. Use the provider console or rescue environment, inspect networking, SSH configuration and firewall state, and avoid repeatedly rebooting before collecting logs.
Build a restore plan before the next change
Document the exact backup scope, schedule, retention, storage locations, encryption, access credentials, restore owner and expected recovery point. Include commands for rebuilding a clean instance, restoring the database, installing application dependencies, loading secrets and switching traffic. Test the procedure on a separate instance at intervals; a successful backup job alone does not demonstrate that restoration works.
Keep Git history for code and text configuration, APT records for package changes, and independent backups for stateful data. Those layers complement one another: none is a substitute for the others.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




