2

I am using Ubuntu 20.04.01. Say for example i follow a guide that instructs me to install some stuff. So i run the sudo apt install a few times with different names and im done. But then after like 2 weeks i want to remove the stuff i installed. How would i find it so that i can delete it? Like if i forgot all the names of everything i installed.

I come from windows so this whole question may sound very stupid, but there i used to just create a folder and dump EVERYTHING in there. that way i knew that every app folder in that huge dump folder has nothing to do with the system essentials, and i can freely delete the folder of that app. is there a way to do something similar in Ubuntu? specify where exactly i want to install the thing to ensure i can easily delete it if i want to?

maybe im thinking about all of this wrong? At the moment i feel like i have to remember every single name of every single thing i ever install if i want to later find or delete it. that surely cant be the case, right?

  • 2
  • The only apps you can freely move around are AppImages, but I don't endorse trying to obtain all of your software this way. You might want to see how the file system is organized in Ubuntu (and Linux in general) – Nmath Sep 01 '20 at 22:11
  • 1
    This is a rather complex question some of which could be answered by looking at apt-mark showmanual output and dpkg --get-selections ... but frankly none of this will really be a 100% what you want. If you want this behavior, you could do what I am doing, have a script that gets called via APT hook and dumps that into a folder I have inside /etc. And on my systems /etc is kept under version control via etckeeper and so I'll be able to recover the configuration and setup of a system by cloning that and continuously pulling updates from it. – 0xC0000022L Sep 01 '20 at 22:32
  • In addition to the above commands you may also want to salvage /var/lib/apt/extended_states from an existing system. This is what my script also does as APT hook (and for good measure on a regular basis using cron). – 0xC0000022L Sep 01 '20 at 22:33
  • 2
    The concept of separate black-box-OS and Applications is a commercial product concept; get out of that thought pattern here. An Ubuntu system is a conglomeration of dozens of separate upstream projects and many hundreds of individual developers providing assorted building blocks and glue. There is no line to indicate where the OS ends and the applications begin. There are multiple ways to install software and multiple ways to uninstall, and no single method covers everything. My advice: Get into the habit of taking notes. You will need them. – user535733 Sep 02 '20 at 00:46
  • @user535733, to simplify things and make life easier for the user, if there was a record for installed applications with user that installed it, and the date. If the installers used the same format, just snap, flatpak, apt, 90% of ordinary users would be happy. There could be a file on linux, by universal convention, you would just open the file and check which installer, who installed it, and when – danilo Sep 02 '20 at 03:18
  • All of this sounds pretty complicated to a brand new user likeme, i thought it would be easier. Thank you for trying to help, i think i am not ready for such changes to my habbits. – SnSmNtNs Sep 02 '20 at 11:12

1 Answers1

0

This must be a duplicate, but a suggested answer to the proposed dup does not quite answer the question. The list of initially installed packages is kept, and may be used to compare to the apt-mark showmanual output. This keeps things that get updates out of the list, but still may let through some "dist-upgrade" additions. I put the below into a script, myinstp in my bin area to run. The -u on sort seems optional, but doesn't hurt.

comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
ubfan1
  • 17,838