Review APT Autoremove Before Removing Packages You Still Use
APT can identify packages that were installed as dependencies and are no longer required by its current dependency relationships. That does not mean a person has stopped using every item on the proposed removal list. Review the planned transaction before using autoremove to reclaim space.
Read the proposed changes
Wait until other software installations or updates have finished. Run apt-get --simulate autoremove to display a no-action proposal. Read the complete output, including any warning that the current account cannot read all APT configuration. In that case, an administrator should repeat the simulation with the appropriate access.
Look for the packages marked for removal and map unfamiliar names to the applications or hardware features you use. Stop if the list includes something whose role is unclear. A large estimated space saving is not an adequate explanation of why each dependency can go.
Ubuntu distinguishes automatically installed dependencies from packages marked manual. When a particular package is intentionally used directly, its manual status may need correcting. An administrator can mark that exact package manual after confirming its role, then rerun the simulation. Changing every package to manual would obscure the dependency information that makes this review useful.
Treat the preview as a proposal
APT simulations do not lock the package database, so another operation can change the system after the preview. Save the proposed list and check the real transaction's final summary again before accepting it. If the lists differ, establish why rather than assuming the earlier review still applies.
Choose removal and configuration purging separately. Purging also removes package configuration and should not be added merely to make a cleanup feel more complete.
After an authorised cleanup, test the applications and device functions associated with the reviewed packages. Keep the package list with the maintenance note. Completion means the intended unwanted dependencies were removed and the required workflow still works, not simply that the command exited without an error.
Sources: Ubuntu documentation, Ubuntu documentation.