Thursday, May 16, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 905  / 1 Year ago, sun, march 5, 2023, 9:42:23

I currently use Xubuntu and was considering installing/trying GNOME Shell or Cinnamon by installing their respective metapackage. However, doing so would result in a massive number of dependencies being installed which would be almost impossible to remove individually at a later date if I decided I didn't like it. I wonder, therefore, if there is a way that I can track which packages Synaptic automatically downloads as part of the process and create a script of some sort to remove them all as well. I could then rest assured that if I don't like any of my new desktop environments, I can remove them in full without leaving a load of other applications and libraries lying around.



Thankyou for any help! :)


More From » package-management

 Answers
0

I found my own solution to this, and I'm kicking myself because it should have been obvious all along.



Install your program from the terminal, and simply copy/paste the list of dependencies it suggests into a text file. They're already in the perfect format for re-entry/pasting into the terminal at a later date (if you want to remove them).



For example:



sudo apt-get install unity



presents me with:



Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
lib32stdc++6 libdmx1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
account-plugin-flickr appmenu-gtk appmenu-gtk3 appmenu-qt bamfdaemon compiz
compiz-gnome geoclue geoclue-ubuntu-geoip gir1.2-accounts-1.0
gir1.2-gdata-0.0 gir1.2-goa-1.0 gir1.2-signon-1.0 gir1.2-ubuntuoneui-3.0
indicator-appmenu indicator-datetime indicator-printers libbamf3-0
libdbusmenu-qt2 libglewmx1.8 libgnome-menu2 libnux-3.0-0 libnux-3.0-common
libpackagekit-glib2-14 libsyncdaemon-1.0-1 libtimezonemap1
libubuntuoneui-3.0-1 libunity-core-6.0-5 libunity-misc4 libunity-webapps0
nux-tools python3-crypto python3-httplib2 python3-oauthlib
rhythmbox-ubuntuone unity-asset-pool unity-common unity-lens-applications
unity-lens-files unity-lens-music unity-lens-photos unity-lens-shopping
unity-lens-video unity-scope-gdocs unity-scope-musicstores
unity-scope-video-remote unity-services unity-webapps-service
Suggested packages:
python3-crypto-dbg python-crypto-doc
The following NEW packages will be installed
account-plugin-flickr appmenu-gtk appmenu-gtk3 appmenu-qt bamfdaemon compiz
compiz-gnome geoclue geoclue-ubuntu-geoip gir1.2-accounts-1.0
gir1.2-gdata-0.0 gir1.2-goa-1.0 gir1.2-signon-1.0 gir1.2-ubuntuoneui-3.0
indicator-appmenu indicator-datetime indicator-printers libbamf3-0
libdbusmenu-qt2 libglewmx1.8 libgnome-menu2 libnux-3.0-0 libnux-3.0-common
libpackagekit-glib2-14 libsyncdaemon-1.0-1 libtimezonemap1
libubuntuoneui-3.0-1 libunity-core-6.0-5 libunity-misc4 libunity-webapps0
nux-tools python3-crypto python3-httplib2 python3-oauthlib
rhythmbox-ubuntuone unity unity-asset-pool unity-common
unity-lens-applications unity-lens-files unity-lens-music unity-lens-photos
unity-lens-shopping unity-lens-video unity-scope-gdocs
unity-scope-musicstores unity-scope-video-remote unity-services
unity-webapps-service
0 upgraded, 49 newly installed, 0 to remove and 6 not upgraded.
Need to get 6,194 kB of archives.
After this operation, 23.8 MB of additional disk space will be used.
Do you want to continue [Y/n]?


I simply copy and paste the list underneath The following NEW packages will be installed into a text file. Then I just replace the 'new line's with a space and it's all ready to paste back into sudo apt-get remove when I need it.



So to remove Unity (for me), the command is:



sudo apt-get remove account-plugin-flickr appmenu-gtk appmenu-gtk3 appmenu-qt bamfdaemon compiz compiz-gnome geoclue geoclue-ubuntu-geoip gir1.2-accounts-1.0 gir1.2-gdata-0.0 gir1.2-goa-1.0 gir1.2-signon-1.0 gir1.2-ubuntuoneui-3.0 indicator-appmenu indicator-datetime indicator-printers libbamf3-0 libdbusmenu-qt2 libglewmx1.8 libgnome-menu2 libnux-3.0-0 libnux-3.0-common libpackagekit-glib2-14 libsyncdaemon-1.0-1 libtimezonemap1 libubuntuoneui-3.0-1 libunity-core-6.0-5 libunity-misc4 libunity-webapps0 nux-tools python3-crypto python3-httplib2 python3-oauthlib rhythmbox-ubuntuone unity unity-asset-pool unity-common unity-lens-applications unity-lens-files unity-lens-music unity-lens-photos unity-lens-shopping unity-lens-video unity-scope-gdocs unity-scope-musicstores unity-scope-video-remote unity-services unity-webapps-service


Easy! And works for any program.


[#34819] Tuesday, March 7, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ledeball

Total Points: 434
Total Questions: 121
Total Answers: 120

Location: Antigua and Barbuda
Member since Sat, Apr 24, 2021
3 Years ago
;