Cleaning manjaro

the command

pamac list -o

get me that

[joe@joe-Manjaro ~]$ pamac remove --orphans
Preparing...
Checking dependencies...

To remove (159):
  zeitgeist                           1.0.4-1                                                                                              extra
  xapian-core                         1:1.4.20-1                                          (Orphan Of: zeitgeist)                           extra
  qt5-imageformats                    5.15.6+kde+r5-1                                                                                      extra
  python-pytoml                       0.1.21-7                                                                                             community
  python-cachecontrol                 1:0.12.11-1                                                                                          community
  gtest                               1.12.1-1                                                                                             community
  python-simplejson                   3.17.6-4                                                                                             community
  ceph-libs                           15.2.17-1                                                                                            
  fmt                                 9.1.0-1                                             (Orphan Of: ceph-libs)                           extra
  lib32-libgudev                      237-2                                                                                                multilib
  lib32-gstreamer                     1.20.3-2                                                                                             multilib
  lib32-gtk3                          3.24.34+r156+g812b3930d0-1                          (Orphan Of: lib32-gstreamer)                     multilib
  lib32-libxkbcommon                  1.4.1-1                                             (Orphan Of: lib32-gstreamer)                     multilib
  lib32-libepoxy                      1.5.10-1                                            (Orphan Of: lib32-gstreamer)                     multilib
  lib32-libcanberra                   1:0.30+r2+gc0620e4-1                                (Orphan Of: lib32-gstreamer)                     multilib
  lib32-libltdl                       2.4.7-2                                             (Orphan Of: lib32-gstreamer)                     multilib
  lib32-tdb                           1.4.7-1                                             (Orphan Of: lib32-gstreamer)                     multilib
  lib32-colord                        1.4.6-1                                             (Orphan Of: lib32-gstreamer)                     multilib
  mozilla-common                      1.4-6                                                                                                
  alsa-card-profiles                  1:0.3.59-2                                                                                           extra
  bin86                               0.16.21-4                                                                                            community
  libgweather                         40.0+r87+g80e5a652-2                                                                                 
  libopenaptx                         0.2.0-1                                                                                              
  python-distlib                      0.3.6-1                                                                                              community
  tracker                             1:2.3.6+r7+gb27396252-1                                                                              
  python-beaker                       1.11.0-8                                                                                             extra
  libcddb                             1.3.2-6                                                                                              extra
  xmlto                               0.0.28-4                                                                                             extra
  tepl                                1:6.0.2-2                                                                                            community
  amtk                                5.5.2-1                                             (Orphan Of: tepl)                                community
  python2-ordered-set                 3.1.1-4                                                                                              
  gnome-icon-theme                    3.12.0-6                                                                                             
  gnome-icon-theme-symbolic           3.12.0-6                                            (Orphan Of: gnome-icon-theme)                    
  python2-packaging                   20.9-7                                                                                               
  python2-six                         1.16.0-5                                            (Orphan Of: python2-packaging)                   
  python2-pyparsing                   2.4.7-6                                             (Orphan Of: python2-packaging)                   
  steam                               1.0.0.75-2                                                                                           multilib
  lib32-libxcrypt-compat              4.4.28-4                                            (Orphan Of: steam)                               multilib
  lib32-nss                           3.84-1                                              (Orphan Of: steam)                               multilib
  lib32-nspr                          4.35-1                                              (Orphan Of: steam)                               multilib
  lib32-libxss                        1.2.3-2                                             (Orphan Of: steam)                               multilib
  libxcrypt-compat                    4.4.28-2                                            (Orphan Of: steam)                               core
  game-devices-udev                   0.18-1                                              (Orphan Of: steam)                               community
  lib32-alsa-oss                      1.1.8-3                                                                                              multilib
  alsa-oss                            1.1.8-4                                             (Orphan Of: lib32-alsa-oss)                      extra
  gobject-introspection               1.74.0-1                                                                                             extra
  python-mako                         1.2.3-1                                             (Orphan Of: gobject-introspection)               extra
  zita-resampler                      1.8.0-1                                                                                              extra
  celt                                0.11.3-4                                                                                             
  t1lib                               5.1.2-8                                                                                              extra
  python-pyotp                        2.6.0-4                                                                                              community
  python-importlib-metadata           5.0.0-1                                                                                              community
  python-zipp                         3.10.0-1                                            (Orphan Of: python-importlib-metadata)           community
  asciidoc                            10.2.0-1                                                                                             community
  python-entrypoints                  0.4-2                                                                                                community
  go-tools                            4:0.2.0-1                                                                                            community
  dvd+rw-tools                        7.1-9                                                                                                extra
  adwaita-qt5                         1.4.2-1                                                                                              community
  lib32-libnsl                        2.0.0-1                                                                                              multilib
  python-pyasn1                       0.4.8-7                                                                                              extra
  bison                               3.8.2-4                                                                                              core
  gconf                               3.2.6+11+g07808097-10                                                                                
  python-tenacity                     8.1.0-1                                                                                              community
  lib32-dconf                         0.40.0-2                                                                                             multilib
  js60                                60.9.0-2                                                                                             
  lib32-libindicator-gtk2             12.10.1-9                                                                                            multilib
  libindicator-gtk2                   12.10.1-10                                          (Orphan Of: lib32-libindicator-gtk2)             community
  python-progress                     1.6-5                                                                                                community
  lib32-polkit                        121-1                                                                                                
  xorg-font-utils                     7.6-6                                                                                                
  xorg-font-util                      1.3.3-1                                             (Orphan Of: xorg-font-utils)                     extra
  xorg-mkfontscale                    1.2.2-1                                             (Orphan Of: xorg-font-utils)                     extra
  xorg-bdftopcf                       1.1.1-1                                             (Orphan Of: xorg-font-utils)                     extra
  lib32-lz4                           1.9.3-1                                                                                              multilib
  libquvi                             0.9.4-7                                                                                              extra
  libquvi-scripts                     0.9.20131130-5                                      (Orphan Of: libquvi)                             extra
  lua52-bitop                         1.0.2-9                                             (Orphan Of: libquvi)                             community
  lua52-luajson                       1.3.4-3                                             (Orphan Of: libquvi)                             extra
  lua52-lpeg                          1.0.2-4                                             (Orphan Of: libquvi)                             extra
  lua52-expat                         1.5.0-1                                             (Orphan Of: libquvi)                             community
  python-nspektr                      0.4.0-2                                                                                              extra
  libtg_owt                           0.git16.442d5bb593c0ae314960308d78f2016ad1f80c3e-1                                                   community
  libcmis                             0.5.2-12                                                                                             extra
  python-pep517                       0.13.0-1                                                                                             extra
  sof-firmware                        2.2.2-1                                                                                              extra
  id3lib                              3.8.3-18                                                                                             extra
  vala                                0.56.3-1                                                                                             extra
  pkgconf                             1.8.0-1                                             (Orphan Of: vala)                                core
  libofa                              0.9.3-9                                                                                              extra
  python-toml                         0.10.2-8                                                                                             community
  gtkspell3                           3.0.10-2                                                                                             community
  libayatana-indicator                0.9.3-1                                                                                              community
  ayatana-ido                         0.9.2-1                                             (Orphan Of: libayatana-indicator)                community
  ncurses5-compat-libs                6.2-1                                                                                                
  python-rich                         12.6.0-2                                                                                             community
  python-commonmark                   0.9.1-5                                             (Orphan Of: python-rich)                         community
  python-docutils                     1:0.19-2                                            (Orphan Of: python-rich)                         community
  lib32-db                            5.3.28-5                                                                                             multilib
  lib32-libidn                        1.41-1                                                                                               multilib
  gperf                               3.1-3                                                                                                extra
  python-platformdirs                 2.5.2-1                                                                                              extra
  qt4                                 4.8.7-34                                                                                             
  qt5-styleplugins                    5.0.0.20170311-25                                                                                    
  python-contextlib2                  21.6.0-1                                                                                             community
  nvidia-dkms                         520.56.06-2                                                                                          extra
  dkms                                3.0.7-1                                             (Orphan Of: nvidia-dkms)                         extra
  make                                4.3-3                                               (Orphan Of: nvidia-dkms)                         core
  python2-appdirs                     1.4.4-6                                                                                              
  xorg-fonts-alias                    1.0.3-2                                                                                              
  go                                  2:1.19.2-1                                                                                           community
  gnome-common                        3.18.0-4                                                                                             extra
  gtk-doc                             1.33.2-1                                            (Orphan Of: gnome-common)                        extra
  python-anytree                      2.8.0-5                                             (Orphan Of: gnome-common)                        extra
  glib2-docs                          2.74.1-1                                            (Orphan Of: gnome-common)                        core
  yelp-tools                          42.0-1                                              (Orphan Of: gnome-common)                        extra
  mallard-ducktype                    1.0.2-8                                             (Orphan Of: gnome-common)                        extra
  docbook-xsl                         1.79.2-7                                            (Orphan Of: asciidoc)                            extra
  itstool                             1:2.0.7-1                                           (Orphan Of: gnome-common)                        extra
  docbook-xml                         4.5-9                                               (Orphan Of: asciidoc)                            extra
  intltool                            0.51.0-6                                            (Orphan Of: gnome-common)                        extra
  autoconf-archive                    1:2022.09.03-1                                      (Orphan Of: gnome-common)                        community
  autoconf                            2.71-1                                              (Orphan Of: gnome-common)                        core
  lib32-libdbusmenu-gtk2              16.04.0-5                                                                                            multilib
  libdbusmenu-gtk2                    16.04.0-5                                           (Orphan Of: lib32-libdbusmenu-gtk2)              community
  lib32-gtk2                          2.24.33-2                                           (Orphan Of: lib32-libdbusmenu-gtk2)              multilib
  lib32-at-spi2-core                  2.46.0-2                                            (Orphan Of: lib32-libdbusmenu-gtk2)              multilib
  lib32-libcups                       2.4.2-1                                             (Orphan Of: lib32-libdbusmenu-gtk2)              multilib
  lib32-libdbusmenu-glib              16.04.0-5                                           (Orphan Of: lib32-libdbusmenu-gtk2)              multilib
  python-resolvelib                   0.8.1-1                                                                                              extra
  lib32-libgusb                       0.4.2-1                                                                                              multilib
  lib32-libusb                        1.0.26-1                                            (Orphan Of: lib32-libgusb)                       multilib
  lib32-json-glib                     1.6.6-2                                             (Orphan Of: lib32-libgusb)                       multilib
  kwayland                            5.99.0-1                                                                                             extra
  yasm                                1.3.0-5                                                                                              extra
  python-pykeepass                    4.0.3-1                                                                                              community
  python-construct                    2.10.68-1                                           (Orphan Of: python-pykeepass)                    community
  python-future                       0.18.2-7                                            (Orphan Of: python-rich)                         community
  python-dateutil                     2.8.2-4                                             (Orphan Of: python-pykeepass)                    community
  python-argon2_cffi                  21.3.0-2                                            (Orphan Of: python-pykeepass)                    community
  python-argon2-cffi-bindings         21.2.0-2                                            (Orphan Of: python-pykeepass)                    community
  python-pycryptodomex                3.12.0-1                                            (Orphan Of: python-pykeepass)                    community
  gdl                                 3.40.0-1                                                                                             extra
  zita-alsa-pcmi                      0.5.1-1                                                                                              extra
  lib32-rest                          0.8.1-4                                                                                              multilib
  lib32-libsoup                       2.74.3-1                                            (Orphan Of: lib32-rest)                          multilib
  lib32-glib-networking               2.74.0-1                                            (Orphan Of: lib32-rest)                          multilib
  lib32-libproxy                      0.4.18-1                                            (Orphan Of: lib32-rest)                          multilib
  lib32-sqlite                        3.39.3-1                                            (Orphan Of: lib32-rest)                          multilib
  meson                               0.63.3-1                                                                                             extra
  ninja                               1.11.1-1                                            (Orphan Of: meson)                               community
  python-retrying                     1.3.3-13                                                                                             extra
  cdrdao                              1.2.4-2                                                                                              extra
  boost                               1.80.0-3                                                                                             extra
  mhwd-nvidia-340xx                   340.108-1                                                                                            
  imake                               1.0.9-1                                                                                              extra
  gnome-shell-extension-appindicator  46-1                                                                                                 community
  gnome-shell                         1:42.5-1                                            (Orphan Of: gnome-shell-extension-appindicator)  extra
  libgdm                              43.0-1                                              (Orphan Of: gnome-shell-extension-appindicator)  extra
  lib32-pcre                          8.45-3                                                                                               multilib

Total removed size: 1,4 GB

Apply transaction ? [y/N] 

Is safe to delete or leave it? On / i have 15 GB free and the /home 50 GB.
Thank in advance.

This makes no sense if you are on running Gnome, so removing it will lead you to a non functional DE.

You can use the following command to mark a package/packages as “explicitly installed”, so it doesn’t appear in the orphan list:
sudo pacman -D --asexplicit <pkgs>

Unfortunately I have noticed that sometimes, some packages that are needed end up in the orphan list by mistake. You have to be careful when deleting orphans.

Anyway, if you have little free space in your root partition, the best you can do is to clean your package cache with:
sudo pacman -Scc

This will empty the cache folder. If you want to keep some copies of old packages, you can do a clean up with pamac:
pamac clean --keep 1 (keep one copy, just in case)

Personally I have never needed an old package I am quite sure I can get one from internet if needed, so I maintain zero copies of old already installed packages.

Another place you can look are Systemd logs, especially if you installed your system long time ago. Check how much they take with the command journalctl --disk-usage
You can make a cleaning with:
journalctl --vacuum-size=200M (limit to 200MiB example)
or
journalctl --vacuum-time=7d (limit to last 7 days example)

1 Like

My DE is mate but i use gnome apps so i think i can’t delete it.

Why would you have gnome-shell-extension-appindicator on Mate DE?

Ive seen it installed (or selectable) as an optional dependency when installing an app before. Think it was gnome screen shot

I have used this command multiple times, and I really can’t complain about it.

So I think it’s safe.

I have installed

I don’t disagree, but you don’t install whatever program you like, regardless of the possible dependencies it may have, like me

Αnyway i will leave it as is and thank you all for your replies and i will continue until the disk is full :rofl:

@cfinnberg had some good recommendations if you are looking to keep things “clean”. Me too :slight_smile: I would like to add that you don’t need to manually run pamac clean because there is a systemd timer setup. systemctl list-timers will show pamac-cleancache. The number of packages to keep in cache can be set via the pamac GUI or setting KeepNumPackages in /etc/pamac.conf.

You’ll definitely want to set something to manage the journal.

One issue I run into is keeping track of when packages get moved to the AUR. I use the command below to show packages that are installed on the system that do not exist in the sync respository. The packages were either installed on purpose from the AUR or were moved to the AUR. The recent update showed, “ceph, ceph-libs and ceph-mgr dropped to the AUR”, but packages aren’t always listed in the announcement.

comm -3 <(pacman -Sl | grep installed | cut -d ' ' -f2 | sort) <(pacman -Q | cut -d' ' -f1 | sort)

On a virtual machine, I was able to get the orphans down to 0 (I could restore it if needed), but it is not without some work. I removed using pacman -Rns. On my main machine I have 54 orphan packages that I’m going to rewiew. Of those, I know I need to keep 10 of them. I’m going to pay more attention when I add and remove packages.

This is what I did. I took the list of orphans (use --quiet), minus the ones I wanted to keep (grep -E -v -e (p1|p2)), and piped that to pacman -Sii | grep -E -e '(Name|Required By)'. I double verified using pactree -r pkg. I also checked the logs using grep pkg /rootfs-pkgs.txt /desktopfs-pkgs.txt /var/log/pacman.log to see when the package was installed and in what context. I rebooted and everything seems to be working :slight_smile: But if in doubt, leave it, and hopefully future installs will shake things out nicely.