Personal tools
     DOCUMENTATION

Conary:conary remove

From rPath Wiki

Jump to: navigation, search
Conary --> Conary Commands --> conary remove
conary remove
conary remove <path>
Example> conary remove /etc/example/example.cfg


Use conary remove on a Conary-based system to remove a packaged file and instruct Conary never to install it. This provides the option to trim the files installed on your system and to maintain those changes when updating the system.

One example of using conary remove is to use a custom /etc/mail/sendmail.mc configuration file and prevent it from receiving Conary updates:

#> conary q sendmail --lsl | grep sendmail.mc
-rw-r--r--    1 root     root         5824 Oct 15  2005 /etc/mail/sendmail.mc

# cp /etc/mail/sendmail.mc ~

# conary remove /etc/mail/sendmail.mc

# ls /etc/mail/sendmail.mc
ls: /etc/mail/sendmail.mc: No such file or directory

# cp /mnt/admin-resources/sendmail/sendmail.mc /etc/mail/

# ls -l /etc/mail/sendmail.mc
-rw-r--r--  1 root root 5872 Sep  1 13:17 /etc/mail/sendmail.mc

# conary update sendmail
...

# ls -l /etc/mail/sendmail.mc
-rw-r--r--  1 root root 5872 Sep  1 13:17 /etc/mail/sendmail.mc

In this example, the conary query confirmed the file was part of the sendmail package and gave the long listing of the file information, including the size and timestamp of the file. After making a backup copy of the file to be removed, the root user used conary remove to remove the file and used ls to confirm the file was removed from the filesystem. The user then copied another sendmail.mc file in its place from a mounted filesystem and confirmed the size and timestamp after the copy. The user later ran an update on sendmail and confirmed that the sendmail.mc file remained as it was. The user can also use conary verify to confirm that Conary did not update the file.

Note that protecting a configuration file from updates is not a necessity because Conary update merges updates to a file while preserving the customizations. Such activities as this example are done based on the behavior and use of the software and not because of Conary.

   The only way to reverse the effect of conary remove is to erase and reinstall the trove containing the removed file.