I've been using Linux Mint for a while now, but I'm not really familiar with how package management works. Coming from the simplicity of Windows, where programs are just folders with everything inside, I find this a bit confusing. I'm ready to dive in and learn about Linux package management, but I prefer to read rather than watch videos. Here are my questions:
- How do I add repositories to my system?
- How can I check which repositories I've already added?
- How can I find out where packages are installed using the terminal?
- What's the process for uninstalling packages?
- How can I ensure everything is completely removed when I uninstall something?
These are just a few of my questions, but understanding these concepts would significantly enhance my Linux experience.
2 Answers
For Linux Mint, which uses the APT package manager, you can find the repositories in the `/etc/apt/apt.conf.d/` directory. To add repositories, just edit the appropriate files there. You can check which ones you've added by looking in `/etc/apt/sources.list.d/`. To see where a program is installed, you can use `whereis` followed by the application's name. Uninstalling can be done with `sudo apt remove packageName`, but if you want to remove configuration files as well, use `sudo apt purge packageName`. Just remember, purging won’t remove files from your home directory that were created by the app, so you might have to handle those manually.
You're on the right track! Repositories are stored in `/etc/apt/sources.list` or in the `/etc/apt/sources.list.d/` directory. Run `sudo apt update` after adding new repositories to refresh your package list. To see where a package is installed, you can use `dpkg -L packageName`. For uninstalling, `sudo apt remove packageName` does the job, but it won't delete everything, especially config files in `/etc`. To fully remove those, use `sudo apt purge packageName`. You might still need to check your home directory for any leftover files, just like in Windows.

I appreciate the explanation! So when I use `dpkg -L packageName`, it's just listing the files related to that package, right?