apt-get autoremove is the Linux command used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.
If you have installed all the software using apt-get then all the dependencies are then you can use this whereas if you have manually installed the software then not using autoremove to clear potentially unused packages is probably the safer choice.
During your initial system update some of the packages may become obsolete, hence are no longer required. To remove all no longer required packages execute:
Ubuntu Clean up with apt-get autoremove
$ sudo apt-get autoremove
If Apache, PHP, mod packages related dependencies removed by using this command, then restarting the Apache is recommended.
In case no dependencies package in your system, you will get the result as below:
user@gtechhub:~$ sudo apt-get autoremove [sudo] password for user: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. user@gtechhub:~$